Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ add salmon run boss #127

Merged
merged 2 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
ika3 (0.9.0)
ika3 (0.9.1)
activesupport (>= 6.0.0)
faraday (>= 2.7.0)

Expand Down
14 changes: 12 additions & 2 deletions lib/ika3/schedule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def initialize(data)
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
Expand All @@ -87,6 +87,7 @@ def initialize(data)
@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
Expand All @@ -107,7 +108,16 @@ def initialize(data)
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
Expand Down
2 changes: 1 addition & 1 deletion lib/ika3/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Ika3
VERSION = '0.9.0'
VERSION = '0.9.1'
end
7 changes: 7 additions & 0 deletions sig/ika3/schedule.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ module Ika3
@end_time: untyped
@stage: Stage
@weapons: Array[Weapon]
@boss: untyped
def initialize: (Hash[untyped, untyped] data) -> void

class Stage
Expand All @@ -56,6 +57,12 @@ module Ika3
@image: String
def initialize: (Hash[untyped, untyped] data) -> void
end

class Boss
@name: String
@image: String
def initialize: (Hash[untyped, untyped] data) -> void
end
end
end
end