Class: SoldierOfCode::SpyVsSpy::Version
- Inherits:
-
Object
- Object
- SoldierOfCode::SpyVsSpy::Version
- Defined in:
- lib/spy_vs_spy.rb
Instance Attribute Summary collapse
-
#major ⇒ Object
Returns the value of attribute major.
-
#minor ⇒ Object
Returns the value of attribute minor.
-
#sub ⇒ Object
Returns the value of attribute sub.
Instance Method Summary collapse
Instance Attribute Details
#major ⇒ Object
Returns the value of attribute major.
58 59 60 |
# File 'lib/spy_vs_spy.rb', line 58 def major @major end |
#minor ⇒ Object
Returns the value of attribute minor.
58 59 60 |
# File 'lib/spy_vs_spy.rb', line 58 def minor @minor end |
#sub ⇒ Object
Returns the value of attribute sub.
58 59 60 |
# File 'lib/spy_vs_spy.rb', line 58 def sub @sub end |
Instance Method Details
#to_s ⇒ Object
60 61 62 |
# File 'lib/spy_vs_spy.rb', line 60 def to_s [major, minor, sub].compact.join('.') end |
#update(major = nil, minor = nil, sub = nil) ⇒ Object
64 65 66 |
# File 'lib/spy_vs_spy.rb', line 64 def update(major = nil, minor = nil, sub = nil) @major, @minor, @sub = major, minor, sub end |