lib/ika3/schedule.rb in ika3-0.9.0 vs lib/ika3/schedule.rb in ika3-0.9.1
- old
+ new
@@ -76,19 +76,20 @@
private_constant :Stage, :Rule
end
class Salmon
- attr_reader :start_time, :end_time, :stage, :weapons
+ attr_reader :start_time, :end_time, :stage, :weapons, :boss
def initialize(data)
return unless data
@start_time = data['start_time']
@end_time = data['end_time']
@stage = Stage.new(data['stage'])
@weapons = data['weapons'].map { |weapon| Weapon.new(weapon) }
+ @boss = Boss.new(data['boss'])
end
class Stage
attr_reader :name, :image
@@ -105,10 +106,19 @@
@name = data['name']
@image = data['image']
end
end
- private_constant :Stage, :Weapon
+ class Boss
+ attr_reader :name, :id
+
+ def initialize(data)
+ @name = data['name']
+ @id = data['id']
+ end
+ end
+
+ private_constant :Stage, :Weapon, :Boss
end
private_constant :Battle, :Salmon
private