Class: Deas::Template::Partial
- Inherits:
-
Deas::Template
- Object
- Deas::Template
- Deas::Template::Partial
- Defined in:
- lib/deas/template.rb
Instance Attribute Summary
Attributes inherited from Deas::Template
Instance Method Summary collapse
-
#initialize(sinatra_call, name, locals = nil) ⇒ Partial
constructor
A new instance of Partial.
Methods inherited from Deas::Template
Constructor Details
#initialize(sinatra_call, name, locals = nil) ⇒ Partial
Returns a new instance of Partial.
66 67 68 69 70 71 72 73 |
# File 'lib/deas/template.rb', line 66 def initialize(sinatra_call, name, locals = nil) = { :locals => (locals || {}) } name = begin basename = File.basename(name.to_s) name.to_s.sub(/#{basename}\Z/, "_#{basename}") end super sinatra_call, name, end |