Class: Rbapp::Runner
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Rbapp::Runner
- Includes:
- Thor::Actions
- Defined in:
- lib/rbapp.rb
Class Method Summary collapse
Instance Method Summary collapse
- #copy_sample_task ⇒ Object
- #create_app_file ⇒ Object
- #create_bin_file ⇒ Object
- #create_gem_file ⇒ Object
- #create_version_file ⇒ Object
Class Method Details
.source_root ⇒ Object
15 16 17 |
# File 'lib/rbapp.rb', line 15 def self.source_root File.dirname(__FILE__) end |
Instance Method Details
#copy_sample_task ⇒ Object
35 36 37 38 |
# File 'lib/rbapp.rb', line 35 def copy_sample_task return unless .sample? copy_file "templates/app/lib/tasks/sample.thor", "#{name}/lib/tasks/sample.thor" end |
#create_app_file ⇒ Object
27 28 29 |
# File 'lib/rbapp.rb', line 27 def create_app_file template('templates/app/lib/app.tt', "#{name}/lib/#{name}.rb") end |
#create_bin_file ⇒ Object
19 20 21 |
# File 'lib/rbapp.rb', line 19 def create_bin_file template('templates/app/bin/app.tt', "#{name}/bin/#{name}.rb") end |
#create_gem_file ⇒ Object
23 24 25 |
# File 'lib/rbapp.rb', line 23 def create_gem_file template('templates/app/Gemfile.tt', "#{name}/Gemfile") end |
#create_version_file ⇒ Object
31 32 33 |
# File 'lib/rbapp.rb', line 31 def create_version_file template('templates/app/lib/app/version.tt', "#{name}/lib/#{name}/version.rb") end |