Class: Houston::Extensions::Deprecated::DeprecatedFieldDsl
- Inherits:
-
Object
- Object
- Houston::Extensions::Deprecated::DeprecatedFieldDsl
- Defined in:
- lib/houston/boot/extensions/deprecated.rb
Instance Attribute Summary collapse
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#render_block ⇒ Object
readonly
Returns the value of attribute render_block.
Instance Method Summary collapse
Instance Attribute Details
#label ⇒ Object (readonly)
Returns the value of attribute label.
88 89 90 |
# File 'lib/houston/boot/extensions/deprecated.rb', line 88 def label @label end |
#render_block ⇒ Object (readonly)
Returns the value of attribute render_block.
88 89 90 |
# File 'lib/houston/boot/extensions/deprecated.rb', line 88 def render_block @render_block end |
Instance Method Details
#add_to(view) ⇒ Object
98 99 100 101 |
# File 'lib/houston/boot/extensions/deprecated.rb', line 98 def add_to(view) render_block = @render_block view.add_field(@label) { |*args| instance_exec(*args, &render_block).html_safe } end |
#html(&block) ⇒ Object
94 95 96 |
# File 'lib/houston/boot/extensions/deprecated.rb', line 94 def html(&block) @render_block = block end |
#name(value) ⇒ Object
90 91 92 |
# File 'lib/houston/boot/extensions/deprecated.rb', line 90 def name(value) @label = value end |