Class: Variation::Change
- Inherits:
-
Object
- Object
- Variation::Change
- Defined in:
- lib/variation/change.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#end_value ⇒ Object
Returns the value of attribute end_value.
-
#length ⇒ Object
Returns the value of attribute length.
Instance Method Summary collapse
-
#initialize(hashed_args) ⇒ Change
constructor
Pass :length and :end_value by hash.
Constructor Details
#initialize(hashed_args) ⇒ Change
Pass :length and :end_value by hash. Length must be > 0.
6 7 8 9 10 11 12 |
# File 'lib/variation/change.rb', line 6 def initialize hashed_args raise HashedArgMissingError unless hashed_args.has_key?(:length) raise HashedArgMissingError unless hashed_args.has_key?(:end_value) self.length = hashed_args[:length] self.end_value = hashed_args[:end_value] end |
Instance Attribute Details
#end_value ⇒ Object
Returns the value of attribute end_value.
3 4 5 |
# File 'lib/variation/change.rb', line 3 def end_value @end_value end |
#length ⇒ Object
Returns the value of attribute length.
3 4 5 |
# File 'lib/variation/change.rb', line 3 def length @length end |