Class: BangBang::Controller

Inherits:
Sinatra::Base
  • Object
show all
Includes:
Controllers
Defined in:
lib/bang-bang/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.



16
17
18
# File 'lib/bang-bang/controller.rb', line 16

def helper
  @helper
end

#viewsObject (readonly)

Returns the value of attribute views.



16
17
18
# File 'lib/bang-bang/controller.rb', line 16

def views
  @views
end

Instance Method Details

#servicesObject



38
39
40
# File 'lib/bang-bang/controller.rb', line 38

def services
  self.class.services
end

#static!Object



50
51
52
# File 'lib/bang-bang/controller.rb', line 50

def static!
  nil
end

#urisObject



42
43
44
# File 'lib/bang-bang/controller.rb', line 42

def uris
  self.class.uris
end

#view(path, *args) ⇒ Object



46
47
48
# File 'lib/bang-bang/controller.rb', line 46

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