Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'pokemon_tcg_sdk'
- require 'json'
- Dir.glob('json/cards/*.json').each do |file|
- blob = JSON.parse(IO.read(file))
- blob.each do |card|
- begin
- Pokemon::Card.new.from_json(card.to_json)
- rescue => e
- puts "Card #{card['id']} errored with #{e.message}"
- end
- end
- end
Add Comment
Please, Sign In to add comment