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



48
49
50
# File 'lib/true-web/controller.rb', line 48

def services
  self.class.services
end

#static!Object



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

def static!
  nil
end

#urisObject



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

def uris
  self.class.uris
end

#view(path, *args) ⇒ Object



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

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