Class: Knife::Helper::Template
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Knife::Helper::Template
- Includes:
- Thor::Actions
- Defined in:
- lib/knife/helper/template.rb
Instance Method Summary collapse
- #flush ⇒ Object
-
#initialize(source, target, params = {}) ⇒ Template
constructor
A new instance of Template.
Constructor Details
#initialize(source, target, params = {}) ⇒ Template
Returns a new instance of Template.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/knife/helper/template.rb', line 10 def initialize(source, target, params={}) super() self.class.source_root( Pathname.new( File.("../../../../", __FILE__) ).join("templates") ) @source = source @target = target @params = params end |
Instance Method Details
#flush ⇒ Object
22 23 24 25 26 |
# File 'lib/knife/helper/template.rb', line 22 def flush() template(@source, @target, @params ) end |