Skip to content
Merged
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
8 changes: 4 additions & 4 deletions lib/tasks/cards.rake
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,8 @@ namespace :cards do

# Collect each card pool's cycles
card_pools.each do |p|
next if p['cycles'].nil?
p['cycles'].each do |s|
next if p['card_cycle_ids'].nil?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outside of this pr, can you use dot syntax for these accesses?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure. i'll do a cleanup CL. Is there anything gained aside from -3 characters per access?

Copy link

@NoahTheDuke NoahTheDuke Jul 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preface: I don't exactly remember the details so take this with a grain of salt.

That being said, I don't think so and it doesn't actually matter so you don't have to change over if you don't want to. It was something I had to do when the properties used dashes instead of underscores and now that they're underscores you can use dot syntax, but like javascript, they're equivalent so don't do extra work if you don't wanna.

p['card_cycle_ids'].each do |s|
card_pool_id_to_cycle_id << [p['id'], s]
end
end
Expand Down Expand Up @@ -353,8 +353,8 @@ namespace :cards do

# Collect each card pool's sets
card_pools.each do |p|
next if p['packs'].nil?
p['packs'].each do |s|
next if p['card_set_ids'].nil?
p['card_set_ids'].each do |s|
card_pool_id_to_set_id << [p['id'], s]
end
end
Expand Down