Class: Beds::CLI::New

Inherits:
Object
  • Object
show all
Defined in:
lib/new.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#appObject

Returns the value of attribute app.



4
5
6
# File 'lib/new.rb', line 4

def app
  @app
end

#gemsObject

Returns the value of attribute gems.



4
5
6
# File 'lib/new.rb', line 4

def gems
  @gems
end

#optionsObject

Returns the value of attribute options.



4
5
6
# File 'lib/new.rb', line 4

def options
  @options
end

#optsObject

Returns the value of attribute opts.



4
5
6
# File 'lib/new.rb', line 4

def opts
  @opts
end