Class: Remedy::View
- Inherits:
-
Object
- Object
- Remedy::View
- Defined in:
- lib/remedy/view.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#footer ⇒ Object
Returns the value of attribute footer.
-
#header ⇒ Object
Returns the value of attribute header.
-
#length ⇒ Object
Returns the value of attribute length.
Instance Method Summary collapse
-
#initialize(body, header = [], footer = []) ⇒ View
constructor
A new instance of View.
- #to_s(force_recompile = false) ⇒ Object
Constructor Details
#initialize(body, header = [], footer = []) ⇒ View
Returns a new instance of View.
3 4 5 |
# File 'lib/remedy/view.rb', line 3 def initialize body, header = [], = [] @header, @body, @footer = header, body, end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
6 7 8 |
# File 'lib/remedy/view.rb', line 6 def body @body end |
#footer ⇒ Object
Returns the value of attribute footer.
6 7 8 |
# File 'lib/remedy/view.rb', line 6 def @footer end |
#header ⇒ Object
Returns the value of attribute header.
6 7 8 |
# File 'lib/remedy/view.rb', line 6 def header @header end |
#length ⇒ Object
Returns the value of attribute length.
6 7 8 |
# File 'lib/remedy/view.rb', line 6 def length @length end |
Instance Method Details
#to_s(force_recompile = false) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/remedy/view.rb', line 8 def to_s force_recompile = false unless @view.nil? || force_recompile then @view else reset_length! @view = compile! end end |