Class: Gamefic::Sdk::Shell
- Inherits:
-
Thor
- Object
- Thor
- Gamefic::Sdk::Shell
- Defined in:
- lib/gamefic-sdk/shell.rb
Instance Method Summary collapse
Instance Method Details
#diagram(type) ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/gamefic-sdk/shell.rb', line 33 def diagram type main = Pathname.new([:directory]).join('main.rb').realpath.to_s require_relative main plot = Gamefic::Plot.new diagram = Gamefic::Sdk::Diagram.new(plot) puts diagram.get(type).to_json end |
#init(directory_name) ⇒ Object
18 19 20 21 22 |
# File 'lib/gamefic-sdk/shell.rb', line 18 def init(directory_name) scaffold = [:gem] ? 'library' : 'project' Gamefic::Sdk::Scaffold.build scaffold, directory_name, specs: [:specs] puts "Gamefic project initialized at #{File.realpath(directory_name)}" end |