Module: Sinatra::ViewObjects::View

Defined in:
lib/sinatra/view_objects.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#app=(value) ⇒ Object

Sets the attribute app

Parameters:

  • value

    the value to set the attribute app to.



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, options = {})
  app.erb name, options.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