Class: Pah::Runner
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Pah::Runner
- Defined in:
- lib/pah/runner.rb
Instance Method Summary collapse
Instance Method Details
#apply_n(partial_name, message = '') ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/pah/runner.rb', line 8 def apply_n(partial_name, = '') print .green in_root do Bundler.with_clean_env do require "#{partials}/#{partial_name}" "::Pah::Templates::#{partial_name.to_s.classify}".constantize.new([], self.).call end end end |
#partials ⇒ Object
4 5 6 |
# File 'lib/pah/runner.rb', line 4 def partials File.join(TEMPLATE_ROOT, 'templates') end |