Class: Treetop::Runtime::SyntaxNode

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fromObject (readonly)

Returns the value of attribute from.



7
8
9
# File 'lib/worked/inputparser.rb', line 7

def from
  @from
end

#toObject (readonly)

Returns the value of attribute to.



7
8
9
# File 'lib/worked/inputparser.rb', line 7

def to
  @to
end

#totalObject (readonly)

Returns the value of attribute total.



7
8
9
# File 'lib/worked/inputparser.rb', line 7

def total
  @total
end

Instance Method Details

#minutesObject

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_iObject

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