Module: YardGhurt::Util
Overview
Utility methods in a separate module/mixin, so that a programmer can require/load a sole task:
require 'yard_ghurt/gfm_fix_task'
Else, programmers would be required to always require/load the entire yard_ghurt
module:
require 'yard_ghurt'
All internal code should use this module.
External code can either use this module or YardGhurt, which includes this module as a mixin.
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- TRUE_BOOLS =
Returns the lower-case Strings that will equal to
true
. %w[ 1 on t true y yes ].freeze
- SEM_VER_REGEX =
Returns a very flexible (non-strict) Semantic Versioning regex, ignoring pre-release/build-metadata.
/(?<major>\d+)(?:\.(?<minor>\d+))?(?:\.(?<patch>\d+))?/.freeze
Class Method Summary collapse
-
.included(mod) ⇒ Object
If include Util is called, extend ClassMethods.
Methods included from ClassMethods
parse_sem_ver, rm_exist, to_bool, yard_sem_ver
Class Method Details
.included(mod) ⇒ Object
If include Util is called, extend ClassMethods.
40 41 42 |
# File 'lib/yard_ghurt/util.rb', line 40 def self.included(mod) mod.extend ClassMethods end |