Class: Gemspec::VersionDiff
- Inherits:
-
Object
- Object
- Gemspec::VersionDiff
- Defined in:
- lib/gemspec/bump.rb
Constant Summary collapse
- IllegalFormat =
Class.new(ArgumentError)
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(string) ⇒ VersionDiff
constructor
A new instance of VersionDiff.
Constructor Details
#initialize(string) ⇒ VersionDiff
Returns a new instance of VersionDiff.
44 45 46 47 |
# File 'lib/gemspec/bump.rb', line 44 def initialize(string) @data = string.split('.') raise IllegalFormat, string unless @data.all? {|item| item =~ /^(\+|\-)?\d*$/ } end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
42 43 44 |
# File 'lib/gemspec/bump.rb', line 42 def data @data end |