Class: CBF::Convertor
- Inherits:
-
Object
- Object
- CBF::Convertor
- Defined in:
- lib/cbf.rb
Instance Attribute Summary collapse
-
#template ⇒ Object
readonly
Returns the value of attribute template.
Instance Method Summary collapse
-
#initialize(template) ⇒ Convertor
constructor
A new instance of Convertor.
- #to(format) ⇒ Object
Constructor Details
#initialize(template) ⇒ Convertor
Returns a new instance of Convertor.
67 68 69 |
# File 'lib/cbf.rb', line 67 def initialize(template) @template = template end |
Instance Attribute Details
#template ⇒ Object (readonly)
Returns the value of attribute template.
65 66 67 |
# File 'lib/cbf.rb', line 65 def template @template end |
Instance Method Details
#to(format) ⇒ Object
71 72 73 |
# File 'lib/cbf.rb', line 71 def to(format) CBF.generate(format, @template) end |