Class: Templater
- Inherits:
-
Object
- Object
- Templater
- Defined in:
- lib/yesman/templater.rb
Instance Method Summary collapse
- #apply_class_to_template ⇒ Object
- #load_template ⇒ Object
- #merge(class_type, template_path) ⇒ Object
Instance Method Details
#apply_class_to_template ⇒ Object
18 19 20 |
# File 'lib/yesman/templater.rb', line 18 def apply_class_to_template @output = @loaded_template.result( @class_type.get_binding ) end |
#load_template ⇒ Object
14 15 16 |
# File 'lib/yesman/templater.rb', line 14 def load_template @loaded_template = ERB.new File.read( @template_path ) end |
#merge(class_type, template_path) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/yesman/templater.rb', line 5 def merge class_type, template_path @class_type = class_type @template_path = template_path load_template apply_class_to_template @output end |