Class: SoldierOfCode::SpyVsSpy::Version

Inherits:
Object
  • Object
show all
Defined in:
lib/spy_vs_spy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#majorObject

Returns the value of attribute major.



58
59
60
# File 'lib/spy_vs_spy.rb', line 58

def major
  @major
end

#minorObject

Returns the value of attribute minor.



58
59
60
# File 'lib/spy_vs_spy.rb', line 58

def minor
  @minor
end

#subObject

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_sObject



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