class TokyoMetro::Static::OperationDay

Public Class Methods

as_of( time ) click to toggle source
# File lib/tokyo_metro/static/operation_day.rb, line 19
def self.as_of( time )
  if time.hour < ::TokyoMetro::DATE_CHANGING_HOUR
    t = time.yesterday
  else
    t = time
  end
  ::DateTime.new( t.year , t.month , t.day , 12 , 0 , 0 , t.zone )
end
of_current() click to toggle source

@!endgroup

# File lib/tokyo_metro/static/operation_day.rb, line 15
def self.of_current
  as_of( ::TokyoMetro.time_now )
end
set_constant() click to toggle source

定数を設定するクラスメソッド @return [nil]

# File lib/tokyo_metro/static/operation_day.rb, line 9
def self.set_constant
  ::TokyoMetro::Static.const_set( :OPERATION_DAYS , self.generate_from_yaml )
end