Class: BrainDamage::View::Label::Default

Inherits:
Base show all
Defined in:
lib/generators/brain_damage/lib/views/labels/default.rb

Instance Attribute Summary

Attributes inherited from Base

#text

Attributes inherited from Templateable::FieldTemplateable

#partial_html, #type

Attributes inherited from Templateable::Base

#inner_html, #options, #template_file

Instance Method Summary collapse

Methods inherited from Base

#dir, #rendered_text

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) ⇒ Default

Returns a new instance of Default.



8
9
10
11
# File 'lib/generators/brain_damage/lib/views/labels/default.rb', line 8

def initialize(field, options)
  super
  @text ||= render_erb_string("cet('<%= singular_table_name %>.<%= name %>')")
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class BrainDamage::Templateable::FieldTemplateable