Class: New
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- New
- Includes:
- Thor::Actions
- Defined in:
- lib/mddb/commands/new.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
7 8 9 |
# File 'lib/mddb/commands/new.rb', line 7 def self.source_root File.('../../templates', __FILE__) end |
Instance Method Details
#config ⇒ Object
15 16 17 |
# File 'lib/mddb/commands/new.rb', line 15 def config template "config.yml.tt", "#{name}/config.yml" end |
#frame ⇒ Object
23 24 25 |
# File 'lib/mddb/commands/new.rb', line 23 def frame template "frame.rb.tt", "#{name}/models/frame.rb" end |
#models ⇒ Object
19 20 21 |
# File 'lib/mddb/commands/new.rb', line 19 def models empty_directory "#{name}/models" end |
#README ⇒ Object
11 12 13 |
# File 'lib/mddb/commands/new.rb', line 11 def README template "README.tt", "#{name}/README" end |
#spec ⇒ Object
27 28 29 |
# File 'lib/mddb/commands/new.rb', line 27 def spec empty_directory "#{name}/spec" end |