Class: Lapillus::Label

Inherits:
Component show all
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, #parent, #path, #response_page=, #session, #webpage

Methods inherited from RenderableComponent

#initialize, #on_render, #render_behaviours, #render_children, #render_component, #render_container, #visible?

Constructor Details

This class inherits a constructor from Lapillus::Component

Instance Method Details

#render_to_element(element) ⇒ Object



7
8
9
# File 'lib/lapillus/components.rb', line 7

def render_to_element(element)
  element.text = value
end

#to_sObject



15
16
17
18
19
20
# File 'lib/lapillus/components.rb', line 15

def to_s
  result = "#{identifier}:"
  result += " #{value}" if has_model?
  result += " (not visible)" if(!visible?)
  return result
end

#valueObject



11
12
13
# File 'lib/lapillus/components.rb', line 11

def value
  super.to_s
end