Class: Hibana::View
- Inherits:
-
Object
- Object
- Hibana::View
- Defined in:
- lib/hibana/view.rb
Instance Method Summary collapse
-
#initialize(layout_template_path: nil, partial_template_path:, request:) ⇒ View
constructor
A new instance of View.
- #to_s ⇒ String
Constructor Details
#initialize(layout_template_path: nil, partial_template_path:, request:) ⇒ View
Returns a new instance of View.
8 9 10 11 12 |
# File 'lib/hibana/view.rb', line 8 def initialize(layout_template_path: nil, partial_template_path:, request:) @layout_template_path = layout_template_path @partial_template_path = partial_template_path @request = request end |
Instance Method Details
#to_s ⇒ String
15 16 17 18 19 20 21 22 23 |
# File 'lib/hibana/view.rb', line 15 def to_s if @layout_template_path render_layout do render_partial end else render_partial end end |