class Koyomi::Period

Attributes

created_at[R]
first[R]
last[R]

Public Class Methods

new(first = nil, last = nil) click to toggle source
Calls superclass method
# File lib/koyomi/period.rb, line 11
def initialize(first = nil, last = nil)
  super()
  @created_at = Date.today
  @first = first||@created_at
  @last = last||@created_at
end

Public Instance Methods

range() click to toggle source
# File lib/koyomi/period.rb, line 18
def range
  (first .. last)
end

Private Instance Methods

method_missing(name, *args, &block) click to toggle source

throw uniplemeted method to self range.

Calls superclass method
# File lib/koyomi/period.rb, line 28
def method_missing(name, *args, &block)
  begin
    self.range.__send__(name, *args, &block)
  rescue => e
    super
  end
end