Class: Vmaps::Main
- Inherits:
-
Object
- Object
- Vmaps::Main
- Defined in:
- lib/vmaps.rb
Instance Method Summary collapse
-
#initialize(source = nil) ⇒ Main
constructor
A new instance of Main.
- #output_json ⇒ Object
Constructor Details
#initialize(source = nil) ⇒ Main
Returns a new instance of Main.
7 8 9 10 11 12 13 14 15 |
# File 'lib/vmaps.rb', line 7 def initialize(source=nil) if source == nil puts "No source given." exit 1 end parser = Parser.new(source) @mappings = parser.parse_to_mappings() end |
Instance Method Details
#output_json ⇒ Object
17 18 19 |
# File 'lib/vmaps.rb', line 17 def output_json puts JSON.dump @mappings end |