Class: TimePatterns::TimeEndingToken

Inherits:
Object
  • Object
show all
Defined in:
lib/todo_time_patterns/tokens.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(values) ⇒ TimeEndingToken

Returns a new instance of TimeEndingToken.



169
170
171
172
173
174
175
176
# File 'lib/todo_time_patterns/tokens.rb', line 169

def initialize(values)
  @interval = 0
  @values = values
  @values.extend(TokensStringRepresentation)

  set_start_and_end_indexes values
  set_minutes values
end

Instance Attribute Details

#end_indexObject (readonly)

Returns the value of attribute end_index.



164
165
166
# File 'lib/todo_time_patterns/tokens.rb', line 164

def end_index
  @end_index
end

#hoursObject (readonly)

Returns the value of attribute hours.



165
166
167
# File 'lib/todo_time_patterns/tokens.rb', line 165

def hours
  @hours
end

#intervalObject (readonly)

Returns the value of attribute interval.



167
168
169
# File 'lib/todo_time_patterns/tokens.rb', line 167

def interval
  @interval
end

#minutesObject (readonly)

Returns the value of attribute minutes.



166
167
168
# File 'lib/todo_time_patterns/tokens.rb', line 166

def minutes
  @minutes
end

#start_indexObject (readonly)

Returns the value of attribute start_index.



163
164
165
# File 'lib/todo_time_patterns/tokens.rb', line 163

def start_index
  @start_index
end

Instance Method Details

#to_sObject



178
179
180
# File 'lib/todo_time_patterns/tokens.rb', line 178

def to_s
  "{ending_form}"
end