Class: Lapillus::Label
- Defined in:
- lib/lapillus/components.rb
Instance Attribute Summary
Attributes inherited from Component
#behaviours, #identifier, #model, #property, #visible
Instance Method Summary collapse
Methods inherited from Component
#add_behaviour, #behaviour, #has_behaviour?, #has_model?, #has_parent?, #initialize, #on_render, #parent, #path, #render_component, #response_page=, #session, #visible?, #webpage
Constructor Details
This class inherits a constructor from Lapillus::Component
Instance Method Details
#render_to_element(element) ⇒ Object
6 7 8 |
# File 'lib/lapillus/components.rb', line 6 def render_to_element(element) element.text = value end |
#to_s ⇒ Object
14 15 16 17 18 19 |
# File 'lib/lapillus/components.rb', line 14 def to_s result = "#{identifier}:" result += " #{value}" if has_model? result += " (not visible)" if(!visible?) return result end |
#value ⇒ Object
10 11 12 |
# File 'lib/lapillus/components.rb', line 10 def value super.to_s end |