Class: Rupi::Generator
- Inherits:
-
Thor
- Object
- Thor
- Rupi::Generator
- Includes:
- Thor::Actions
- Defined in:
- lib/rupi/generator.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/rupi/generator.rb', line 8 def name @name end |
Class Method Details
.source_root ⇒ Object
19 20 21 |
# File 'lib/rupi/generator.rb', line 19 def self.source_root Pathname.new(__FILE__) + '../../../templates' end |
Instance Method Details
#new(name) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/rupi/generator.rb', line 11 def new(name) @name = name copy_file 'Gemfile', "#{name}/Gemfile" template 'Capfile.erb', "#{name}/Capfile" copy_file 'app.rb', "#{name}/app.rb" copy_file 'bundle_config', "#{name}/.bundle/config" end |