Class: Sinatra::Handlebars::Options
- Inherits:
-
Object
- Object
- Sinatra::Handlebars::Options
- Defined in:
- lib/sinatra/options.rb
Instance Attribute Summary collapse
-
#template_packages ⇒ Object
readonly
Returns the value of attribute template_packages.
Instance Method Summary collapse
-
#initialize(app, &block) ⇒ Options
constructor
A new instance of Options.
- #templates(route, files = []) ⇒ Object
Constructor Details
#initialize(app, &block) ⇒ Options
Returns a new instance of Options.
6 7 8 9 10 11 |
# File 'lib/sinatra/options.rb', line 6 def initialize(app, &block) @app = app @template_packages = {} instance_eval(&block) end |
Instance Attribute Details
#template_packages ⇒ Object (readonly)
Returns the value of attribute template_packages.
4 5 6 |
# File 'lib/sinatra/options.rb', line 4 def template_packages @template_packages end |
Instance Method Details
#templates(route, files = []) ⇒ Object
13 14 15 |
# File 'lib/sinatra/options.rb', line 13 def templates(route, files=[]) @template_packages[route] = files end |