Class: TrueWeb::Controller

Inherits:
Sinatra::Base
  • Object
show all
Includes:
Controllers
Defined in:
lib/true-web/controller.rb

Defined Under Namespace

Modules: Controllers

Constant Summary collapse

TEMPLATE_TYPE_NAME =
"Template"

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Controllers

#call!, included

Instance Attribute Details

#helperObject (readonly)

Returns the value of attribute helper.



29
30
31
# File 'lib/true-web/controller.rb', line 29

def helper
  @helper
end

#viewsObject (readonly)

Returns the value of attribute views.



29
30
31
# File 'lib/true-web/controller.rb', line 29

def views
  @views
end

Instance Method Details

#servicesObject



51
52
53
# File 'lib/true-web/controller.rb', line 51

def services
  self.class.services
end

#static!Object



63
64
65
# File 'lib/true-web/controller.rb', line 63

def static!
  nil
end

#urisObject



55
56
57
# File 'lib/true-web/controller.rb', line 55

def uris
  self.class.uris
end

#view(path, *args) ⇒ Object



59
60
61
# File 'lib/true-web/controller.rb', line 59

def view(path, *args)
  views[path].render(*args)
end