Module: ZanTools::Generatable::ClassMethods
- Defined in:
- lib/zan_tools/generatable.rb
Instance Method Summary collapse
- #compile(tmpl) ⇒ Object
- #config ⇒ Object (also: #conf)
- #configure {|config| ... } ⇒ Object
- #define(&block) ⇒ Object
Instance Method Details
#compile(tmpl) ⇒ Object
57 58 59 |
# File 'lib/zan_tools/generatable.rb', line 57 def compile(tmpl) config.compile(tmpl) end |
#config ⇒ Object Also known as: conf
43 44 45 |
# File 'lib/zan_tools/generatable.rb', line 43 def config @config ||= Configuration.new end |
#configure {|config| ... } ⇒ Object
49 50 51 |
# File 'lib/zan_tools/generatable.rb', line 49 def configure yield config end |
#define(&block) ⇒ Object
53 54 55 |
# File 'lib/zan_tools/generatable.rb', line 53 def define(&block) config.instance_eval(&block) end |