Class: BrainDamage::View::Label::Base
- Inherits:
-
Templateable::FieldTemplateable
- Object
- Templateable::Base
- Templateable::FieldTemplateable
- BrainDamage::View::Label::Base
- Defined in:
- lib/generators/brain_damage/lib/views/labels/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Attributes inherited from Templateable::FieldTemplateable
Attributes inherited from Templateable::Base
#inner_html, #options, #template_file
Instance Method Summary collapse
- #dir ⇒ Object
-
#initialize(field, options) ⇒ Base
constructor
A new instance of Base.
- #rendered_text ⇒ Object
Methods inherited from Templateable::FieldTemplateable
#empty_haml_path, #label_guard?, #method_missing, #render, #show?, #show_label?
Methods inherited from Templateable::Base
#indent, #method_missing, #render, #render_erb_file, #render_erb_string, #render_template_file
Constructor Details
#initialize(field, options) ⇒ Base
Returns a new instance of Base.
10 11 12 13 14 |
# File 'lib/generators/brain_damage/lib/views/labels/base.rb', line 10 def initialize(field, ) super @text = [:text] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class BrainDamage::Templateable::FieldTemplateable
Instance Attribute Details
#text ⇒ Object (readonly)
Returns the value of attribute text.
8 9 10 |
# File 'lib/generators/brain_damage/lib/views/labels/base.rb', line 8 def text @text end |
Instance Method Details
#dir ⇒ Object
20 21 22 |
# File 'lib/generators/brain_damage/lib/views/labels/base.rb', line 20 def dir __dir__ end |
#rendered_text ⇒ Object
16 17 18 |
# File 'lib/generators/brain_damage/lib/views/labels/base.rb', line 16 def rendered_text render_erb_string text end |