Module: Inochi::Version
- Defined in:
- lib/inochi/init.rb
Instance Method Summary collapse
-
#major ⇒ Object
Returns the major number in this version.
-
#requirement ⇒ Object
Returns a Gem::Requirement expression.
-
#series ⇒ Object
Returns a string describing any version with the current major number.
Instance Method Details
#major ⇒ Object
Returns the major number in this version.
156 157 158 |
# File 'lib/inochi/init.rb', line 156 def major to_s[/^\d+/] end |
#requirement ⇒ Object
Returns a Gem::Requirement expression.
166 167 168 |
# File 'lib/inochi/init.rb', line 166 def requirement "~> #{major}" end |
#series ⇒ Object
Returns a string describing any version with the current major number.
161 162 163 |
# File 'lib/inochi/init.rb', line 161 def series "#{major}.x.x" end |