Module: Pokedex

Defined in:
lib/pokedex.rb,
lib/pokedex/cli.rb,
lib/pokedex/filter.rb,
lib/pokedex/version.rb

Defined Under Namespace

Classes: CLI, Error, Filter

Constant Summary collapse

VERSION =
'0.1.2'

Class Method Summary collapse

Class Method Details

.allObject



12
13
14
15
16
17
18
# File 'lib/pokedex.rb', line 12

def all
  File.join(root, 'data/pokedex.json').then do |name|
    File.open(name).then do |file|
      JSON.parse(file.read)
    end
  end
end

.regionObject



20
21
22
23
24
25
26
# File 'lib/pokedex.rb', line 20

def region
  File.join(root, 'data/regions.json').then do |name|
    File.open(name).then do |file|
      JSON.parse(file.read)
    end
  end
end