lib/itch/rewards.rb in itch_client-0.3.0 vs lib/itch/rewards.rb in itch_client-0.4.0
- old
+ new
@@ -104,12 +104,12 @@
def parse_row(row)
id = row.css('input[type="hidden"]').find do |input|
input.name.match(/^rewards\[(\d+)\]\[id\]/)
end.value
- attributes = %w[title description amount price].map do |name|
+ attributes = %w[title description amount price].to_h do |name|
[name.to_sym, row.css_at(".reward_#{name}_input").value]
- end.to_h
+ end
attributes[:claimed] = row.css_at(".claimed_count").text
Reward.new(@agent, @game_id, id, attributes)
end