Class: Beds::CLI::Scaffold

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

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Scaffold

Returns a new instance of Scaffold.



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/scaffold.rb', line 4

def initialize(options)
@options = {
  :viewdir => "./views",
  :public => "./public",
  :controllers => "./controllers",
  :routefile => "./scaffold.rb",
  :list => true,
  :save => true,
  :template => true,
  :new => true,
  :index => true,
  :run_hooks => true,
  :exclude => []
  }; @options[:assets] = "#{@options[:public]}/assets"
  get_options(options)
  load_models
  make_files
  run_hooks if @options[:run_hooks]
end