Module: Sinatra::ViewObjects::View
- Defined in:
- lib/sinatra/view_objects.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
writeonly
Sets the attribute app.
Instance Method Summary collapse
Instance Attribute Details
#app=(value) ⇒ Object
Sets the attribute app
41 42 43 |
# File 'lib/sinatra/view_objects.rb', line 41 def app=(value) @app = value end |
Instance Method Details
#erb(name, options = {}) ⇒ Object
47 48 49 |
# File 'lib/sinatra/view_objects.rb', line 47 def erb(name, = {}) app.erb name, .merge(scope: self) end |
#view(name, *args) ⇒ Object
43 44 45 |
# File 'lib/sinatra/view_objects.rb', line 43 def view(name, *args) app.view(name, *args, layout: false) end |