Class: OdaniaStaticPages::Cli
- Inherits:
-
Thor
- Object
- Thor
- OdaniaStaticPages::Cli
- Defined in:
- lib/odania_static_pages/cli.rb
Instance Method Summary collapse
-
#initialize(*args) ⇒ Cli
constructor
A new instance of Cli.
- #new(path = '.') ⇒ Object
Constructor Details
#initialize(*args) ⇒ Cli
Returns a new instance of Cli.
8 9 10 11 12 |
# File 'lib/odania_static_pages/cli.rb', line 8 def initialize(*args) super OdaniaStaticPages.config.environment = [:environment] end |
Instance Method Details
#new(path = '.') ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/odania_static_pages/cli.rb', line 15 def new(path='.') path = File.absolute_path path puts "Generating project under #{path}" FileUtils.mkdir_p path unless File.exist? path config = OdaniaStaticPages.config path config.save! end |