Class: Gem::Version
- Inherits:
-
Micro::YAMLable
- Object
- Micro::YAMLable
- Gem::Version
- Includes:
- Comparable
- Defined in:
- lib/microgem/version.rb
Defined Under Namespace
Classes: Requirement
Instance Attribute Summary collapse
-
#version ⇒ Object
(also: #to_s)
readonly
Returns the value of attribute version.
Class Method Summary collapse
-
.from_gem_dirname(dirname) ⇒ Object
Returns a Gem::Version from a string:.
Instance Method Summary collapse
-
#<=>(other) ⇒ Object
Compare two Version instances.
-
#any? ⇒ Boolean
Returns whether or not any version will do.
-
#marshal_load(version) ⇒ Object
TODO: really test this method, added for utils test.
Methods inherited from Micro::YAMLable
Instance Attribute Details
#version ⇒ Object (readonly) Also known as: to_s
Returns the value of attribute version.
15 16 17 |
# File 'lib/microgem/version.rb', line 15 def version @version end |
Class Method Details
Instance Method Details
#<=>(other) ⇒ Object
Compare two Version instances.
21 22 23 |
# File 'lib/microgem/version.rb', line 21 def <=>(other) version <=> other.version end |
#any? ⇒ Boolean
Returns whether or not any version will do.
26 27 28 |
# File 'lib/microgem/version.rb', line 26 def any? version == 0 || version == '0' end |
#marshal_load(version) ⇒ Object
TODO: really test this method, added for utils test
31 32 33 |
# File 'lib/microgem/version.rb', line 31 def marshal_load(version) @version = version.first end |