Class: Treetop::Runtime::SyntaxNode
- Inherits:
-
Object
- Object
- Treetop::Runtime::SyntaxNode
- Defined in:
- lib/worked/inputparser.rb
Instance Attribute Summary collapse
-
#from ⇒ Object
readonly
Returns the value of attribute from.
-
#to ⇒ Object
readonly
Returns the value of attribute to.
-
#total ⇒ Object
readonly
Returns the value of attribute total.
Instance Method Summary collapse
-
#minutes ⇒ Object
Default value so we don’t have to care whether there really is a minute component.
-
#to_i ⇒ Object
Remove all clutter (‘hour’, ‘:’, etc) from the time and turn into an integer.
Instance Attribute Details
#from ⇒ Object (readonly)
Returns the value of attribute from.
7 8 9 |
# File 'lib/worked/inputparser.rb', line 7 def from @from end |
#to ⇒ Object (readonly)
Returns the value of attribute to.
7 8 9 |
# File 'lib/worked/inputparser.rb', line 7 def to @to end |
#total ⇒ Object (readonly)
Returns the value of attribute total.
7 8 9 |
# File 'lib/worked/inputparser.rb', line 7 def total @total end |
Instance Method Details
#minutes ⇒ Object
Default value so we don’t have to care whether there really is a minute component
17 18 19 |
# File 'lib/worked/inputparser.rb', line 17 def minutes 0 end |
#to_i ⇒ Object
Remove all clutter (‘hour’, ‘:’, etc) from the time and turn into an integer
11 12 13 |
# File 'lib/worked/inputparser.rb', line 11 def to_i text_value.gsub(/\D/, '').to_i end |