Class: Cucumberator::StepLine
- Inherits:
-
Object
- Object
- Cucumberator::StepLine
- Defined in:
- lib/cucumberator/step_line.rb
Instance Attribute Summary collapse
-
#number ⇒ Object
Returns the value of attribute number.
Instance Method Summary collapse
- #+(other) ⇒ Object
- #-(other) ⇒ Object
- #decrement! ⇒ Object
- #increment! ⇒ Object
-
#initialize(line) ⇒ StepLine
constructor
A new instance of StepLine.
- #set(other) ⇒ Object
Constructor Details
#initialize(line) ⇒ StepLine
Returns a new instance of StepLine.
5 6 7 |
# File 'lib/cucumberator/step_line.rb', line 5 def initialize(line) @number = line.to_i end |
Instance Attribute Details
#number ⇒ Object
Returns the value of attribute number.
3 4 5 |
# File 'lib/cucumberator/step_line.rb', line 3 def number @number end |
Instance Method Details
#+(other) ⇒ Object
13 14 15 |
# File 'lib/cucumberator/step_line.rb', line 13 def +(other) number + other.to_i end |
#-(other) ⇒ Object
9 10 11 |
# File 'lib/cucumberator/step_line.rb', line 9 def -(other) number - other.to_i end |
#decrement! ⇒ Object
25 26 27 |
# File 'lib/cucumberator/step_line.rb', line 25 def decrement! self.number -= 1 end |
#increment! ⇒ Object
21 22 23 |
# File 'lib/cucumberator/step_line.rb', line 21 def increment! self.number += 1 end |
#set(other) ⇒ Object
17 18 19 |
# File 'lib/cucumberator/step_line.rb', line 17 def set(other) self.number = other.to_i end |