Module: Pupu::Helpers
- Defined in:
- lib/pupu/adapters/padrino.rb,
lib/pupu/helpers.rb,
lib/pupu/adapters/rango.rb
Overview
Class Method Summary collapse
Instance Method Summary collapse
-
#pupu(name, params = Hash.new) ⇒ Object
Use it in your layout Example: pupu :autocompleter, type: “local”.
- #pupu_page ⇒ Object
Class Method Details
.registered(app) ⇒ Object
11 12 13 |
# File 'lib/pupu/adapters/padrino.rb', line 11 def self.registered(app) app.send(:include, self) end |
Instance Method Details
#pupu(name, params = Hash.new) ⇒ Object
Use it in your layout Example: pupu :autocompleter, type: “local”
13 14 15 16 17 |
# File 'lib/pupu/helpers.rb', line 13 def pupu(name, params = Hash.new) comment = if params.empty? then "<!-- Pupu #{name} without params -->" else "<!-- Pupu #{name} with params #{params.inspect} -->" end [comment, pupu_page.parse(name, params).parse!, "", ""].join("\n") end |