Class: Beds::CLI::New
- Inherits:
-
Object
- Object
- Beds::CLI::New
- Defined in:
- lib/new.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
Returns the value of attribute app.
-
#gems ⇒ Object
Returns the value of attribute gems.
-
#options ⇒ Object
Returns the value of attribute options.
-
#opts ⇒ Object
Returns the value of attribute opts.
Instance Method Summary collapse
-
#initialize(opts) ⇒ New
constructor
A new instance of New.
Constructor Details
#initialize(opts) ⇒ New
Returns a new instance of New.
6 7 8 9 10 11 12 13 |
# File 'lib/new.rb', line 6 def initialize(opts) @options = { :configru => true, :bundler => true, :git => true, :db => :dm,:view => 'erb' } @gems=[] parse_args(opts) (STDERR.puts("Directory #{@app} already exists"); exit 1) if Dir.exist?("./#{@app}") init_dirs write_files end |
Instance Attribute Details
#app ⇒ Object
Returns the value of attribute app.
4 5 6 |
# File 'lib/new.rb', line 4 def app @app end |
#gems ⇒ Object
Returns the value of attribute gems.
4 5 6 |
# File 'lib/new.rb', line 4 def gems @gems end |
#options ⇒ Object
Returns the value of attribute options.
4 5 6 |
# File 'lib/new.rb', line 4 def @options end |
#opts ⇒ Object
Returns the value of attribute opts.
4 5 6 |
# File 'lib/new.rb', line 4 def opts @opts end |