Exception: MaimaiNet::Error::RoutineMaintenance

Inherits:
ClientError show all
Includes:
Maintenance
Defined in:
lib/maimai_net/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Maintenance

#maintenance?

Methods inherited from BaseError

#maintenance?

Constructor Details

#initialize(time_range) ⇒ RoutineMaintenance

Returns a new instance of RoutineMaintenance.



40
41
42
43
44
45
46
47
48
49
# File 'lib/maimai_net/error.rb', line 40

def initialize(time_range)
  start_time, end_time = time_range.begin, time_range.end
  super("Maintenance from %s to %s." % [
    start_time.strftime('%H:%M'),
    end_time.strftime('%H:%M'),
  ])

  @start_time = start_time
  @end_time   = end_time
end

Instance Attribute Details

#end_timeObject (readonly)

Returns the value of attribute end_time.



51
52
53
# File 'lib/maimai_net/error.rb', line 51

def end_time
  @end_time
end

#start_timeObject (readonly)

Returns the value of attribute start_time.



51
52
53
# File 'lib/maimai_net/error.rb', line 51

def start_time
  @start_time
end