Module: Rango::ImplicitRendering
- Includes:
- RenderMixin
- Defined in:
- lib/rango/mixins/rendering.rb
Instance Method Summary collapse
- #context_keys ⇒ Object
- #get_context_value(key) ⇒ Object
-
#render(template) ⇒ Object
so you can’t specify context.
- #scope ⇒ Object
- #set_context_value(key, value) ⇒ Object
Instance Method Details
#context_keys ⇒ Object
123 124 125 126 127 |
# File 'lib/rango/mixins/rendering.rb', line 123 def context_keys instance_variables.map do |name| name[1..-1].to_sym end end |
#get_context_value(key) ⇒ Object
115 116 117 |
# File 'lib/rango/mixins/rendering.rb', line 115 def get_context_value(key) instance_variable_get("@#{key}") end |
#render(template) ⇒ Object
so you can’t specify context
111 112 113 |
# File 'lib/rango/mixins/rendering.rb', line 111 def render(template) # so you can't specify context super template, self.scope end |
#scope ⇒ Object
107 108 109 |
# File 'lib/rango/mixins/rendering.rb', line 107 def scope self end |
#set_context_value(key, value) ⇒ Object
119 120 121 |
# File 'lib/rango/mixins/rendering.rb', line 119 def set_context_value(key, value) instance_variable_set("@#{key}", value) end |