Class: Metamagic::CustomTag
Instance Attribute Summary collapse
-
#render_proc ⇒ Object
readonly
Returns the value of attribute render_proc.
Attributes inherited from Tag
Instance Method Summary collapse
-
#initialize(context, key, value, render_proc) ⇒ CustomTag
constructor
A new instance of CustomTag.
- #remove_prefix? ⇒ Boolean
- #to_html ⇒ Object
Methods inherited from Tag
#<=>, #==, #interpolated_values, #method_missing, #sort_order, #template
Constructor Details
#initialize(context, key, value, render_proc) ⇒ CustomTag
Returns a new instance of CustomTag.
5 6 7 8 |
# File 'lib/metamagic/tags/custom_tag.rb', line 5 def initialize(context, key, value, render_proc) super(context, key, value) @render_proc = render_proc end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Metamagic::Tag
Instance Attribute Details
#render_proc ⇒ Object (readonly)
Returns the value of attribute render_proc.
3 4 5 |
# File 'lib/metamagic/tags/custom_tag.rb', line 3 def render_proc @render_proc end |
Instance Method Details
#remove_prefix? ⇒ Boolean
10 11 12 |
# File 'lib/metamagic/tags/custom_tag.rb', line 10 def remove_prefix? false end |
#to_html ⇒ Object
14 15 16 |
# File 'lib/metamagic/tags/custom_tag.rb', line 14 def to_html instance_exec key, interpolated_values, &render_proc end |