Class: Nation
- Inherits:
-
Object
- Object
- Nation
- Defined in:
- lib/nation.rb
Instance Method Summary collapse
- #get_info ⇒ Object
-
#initialize(nation_name) ⇒ Nation
constructor
A new instance of Nation.
- #print_file(ext_file) ⇒ Object
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_info ⇒ Object
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 |
#print_file(ext_file) ⇒ Object
21 22 23 |
# File 'lib/nation.rb', line 21 def print_file(ext_file) PrintFile.print_nation_info(@nation_info, ext_file) end |