Class: Proforma::Prototype
- Inherits:
-
Object
- Object
- Proforma::Prototype
- Defined in:
- lib/proforma/prototype.rb
Overview
A prototype is a compiled template that has been flattened and ready for rendering.
Direct Known Subclasses
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(children: [], title: '') ⇒ Prototype
constructor
A new instance of Prototype.
Constructor Details
#initialize(children: [], title: '') ⇒ Prototype
Returns a new instance of Prototype.
15 16 17 18 |
# File 'lib/proforma/prototype.rb', line 15 def initialize(children: [], title: '') @children = ModelFactory.array(children) @title = title end |
Instance Attribute Details
#children ⇒ Object
20 21 22 |
# File 'lib/proforma/prototype.rb', line 20 def children Array(@children) end |
#title ⇒ Object
24 25 26 |
# File 'lib/proforma/prototype.rb', line 24 def title @title.to_s end |