Class: TExp::EveryDay

Inherits:
Base
  • Object
show all
Defined in:
lib/texp/every_day.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#*, #+, #-, #-@, #each, #first_day_of_window, #last_day_of_window, #reanchor, register_parse_callback, #to_s, #window

Class Method Details

.parse_callback(stack) ⇒ Object



21
22
23
# File 'lib/texp/every_day.rb', line 21

def parse_callback(stack)
  stack.push TExp::EveryDay.new
end

Instance Method Details

#encode(codes) ⇒ Object

Encode the temporal expression into codes.



16
17
18
# File 'lib/texp/every_day.rb', line 16

def encode(codes)
  codes << encoding_token
end

#includes?(date) ⇒ Boolean

Is date included in the temporal expression.

Returns:

  • (Boolean)


6
7
8
# File 'lib/texp/every_day.rb', line 6

def includes?(date)
  true
end

#inspectObject

Human readable version of the temporal expression.



11
12
13
# File 'lib/texp/every_day.rb', line 11

def inspect
  "every day"
end