Module: MerbFootnotes::Instrumentation::Merb::Controller::Ext
- Defined in:
- lib/merb_footnotes/instrumentation.rb
Instance Method Summary collapse
-
#_call_filters(filters) ⇒ Object
PRIVATE API CALL.
- #add_footnote(bucket, content) ⇒ Object
- #footnotes ⇒ Object
- #partial(template, *args) ⇒ Object
- #render(thing = nil, *args) ⇒ Object
Instance Method Details
#_call_filters(filters) ⇒ Object
PRIVATE API CALL. BAD BAD. MUST FIX
88 89 90 91 92 93 94 95 96 97 |
# File 'lib/merb_footnotes/instrumentation.rb', line 88 def _call_filters(filters) if filters.empty? super else filters.each do |filter| self.add_footnote("filters", filter) end super end end |
#add_footnote(bucket, content) ⇒ Object
70 71 72 73 74 75 |
# File 'lib/merb_footnotes/instrumentation.rb', line 70 def add_footnote(bucket, content) @_footnotes ||= {} @_footnotes[bucket.to_sym] ||= [] @_footnotes[bucket.to_sym] << content return @footnotes end |
#footnotes ⇒ Object
66 67 68 |
# File 'lib/merb_footnotes/instrumentation.rb', line 66 def footnotes @_footnotes || {} end |
#partial(template, *args) ⇒ Object
82 83 84 85 |
# File 'lib/merb_footnotes/instrumentation.rb', line 82 def partial(template, *args) self.add_footnote("partials", [template, args]) return super end |
#render(thing = nil, *args) ⇒ Object
77 78 79 80 |
# File 'lib/merb_footnotes/instrumentation.rb', line 77 def render(thing = nil, *args) self.add_footnote("renders", [thing, args]) super end |