Class: Awestruct::CLI::Generate
- Inherits:
-
Object
- Object
- Awestruct::CLI::Generate
- Defined in:
- lib/awestruct/cli/generate.rb
Instance Method Summary collapse
-
#initialize(config, profile = nil, base_url = nil, default_base_url = 'http://localhost:4242', force = false) ⇒ Generate
constructor
A new instance of Generate.
- #run ⇒ Object
Constructor Details
#initialize(config, profile = nil, base_url = nil, default_base_url = 'http://localhost:4242', force = false) ⇒ Generate
Returns a new instance of Generate.
7 8 9 10 11 12 13 |
# File 'lib/awestruct/cli/generate.rb', line 7 def initialize(config, profile=nil, base_url=nil, default_base_url='http://localhost:4242', force=false) @profile = profile @base_url = base_url @default_base_url = default_base_url @force = force @engine = Awestruct::Engine.new( config ) end |
Instance Method Details
#run ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/awestruct/cli/generate.rb', line 15 def run() begin puts "Generating site" @engine.run( @profile, @base_url, @default_base_url, @force ) rescue =>e puts e puts e.backtrace end end |