Module: Flagmoji

Extended by:
Flagmoji
Included in:
Flagmoji
Defined in:
lib/flagmoji.rb,
lib/flagmoji/country.rb,
lib/flagmoji/version.rb

Defined Under Namespace

Classes: Country

Constant Summary collapse

VERSION =
"0.1.0"

Instance Method Summary collapse

Instance Method Details

#allObject



12
13
14
# File 'lib/flagmoji.rb', line 12

def all
  @all ||= map_data_to_country
end

#data_fileObject



8
9
10
# File 'lib/flagmoji.rb', line 8

def data_file
  File.expand_path("../../data/flags.json", __FILE__)
end

#from_code(code) ⇒ Object Also known as: []



16
17
18
# File 'lib/flagmoji.rb', line 16

def from_code(code)
  all[code] || Country.null
end