Class: Nation

Inherits:
Object
  • Object
show all
Defined in:
lib/nation.rb

Instance Method Summary collapse

Constructor Details

#initialize(nation_name) ⇒ Nation

Returns a new instance of Nation.



8
9
10
11
12
# File 'lib/nation.rb', line 8

def initialize(nation_name)
  @nation_info = {}
  @nation_name = nation_name
  @nation_code = standarize(nation_name)
end

Instance Method Details

#get_infoObject



14
15
16
17
18
19
# File 'lib/nation.rb', line 14

def get_info
  basic_info = BasicInfo.new.get(@nation_code)
  detailed_info = DetailedInfo.new.get(@nation_name)

  @nation_info = basic_info.merge(detailed_info)
end


21
22
23
# File 'lib/nation.rb', line 21

def print_file(ext_file)
  PrintFile.print_nation_info(@nation_info, ext_file)
end