Class: Sinatra::Hat::Router
Overview
Tells Sinatra which routes to generate. The routes created automatically when the actions are loaded.
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
-
#maker ⇒ Object
readonly
Returns the value of attribute maker.
Class Method Summary collapse
Instance Method Summary collapse
- #generate(app) ⇒ Object
-
#initialize(maker) ⇒ Router
constructor
A new instance of Router.
Constructor Details
#initialize(maker) ⇒ Router
Returns a new instance of Router.
14 15 16 |
# File 'lib/sinatras-hat/router.rb', line 14 def initialize(maker) @maker = maker end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
8 9 10 |
# File 'lib/sinatras-hat/router.rb', line 8 def app @app end |
#maker ⇒ Object (readonly)
Returns the value of attribute maker.
8 9 10 |
# File 'lib/sinatras-hat/router.rb', line 8 def maker @maker end |
Class Method Details
.cache ⇒ Object
10 11 12 |
# File 'lib/sinatras-hat/router.rb', line 10 def self.cache @cache ||= [] end |