Skip to content

Commit

Permalink
Add labels for every language available
Browse files Browse the repository at this point in the history
  • Loading branch information
tmtmtmtm committed Dec 14, 2016
1 parent bcc08cf commit 7acbb11
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions scraper.rb
Expand Up @@ -20,16 +20,17 @@ def data
warn "Unknown property for #{id}: #{p} = #{send(p).value}"
end

base_data.merge(wanted_data)
base_data.merge(wanted_data).merge(names)
end

private

def base_data
{
id: id,
label: label(:en),
}
{ id: id }
end

def names
labels.map { |k, v| ["name__#{k}", v[:value]] }.to_h
end

def unknown_properties
Expand Down

0 comments on commit 7acbb11

Please sign in to comment.