Class: Interview::ContainerAttribute

Inherits:
Attribute show all
Includes:
HasControls
Defined in:
lib/interview/container_attribute.rb

Instance Attribute Summary

Attributes included from HasControls

#controls

Attributes inherited from Attribute

#align, #caption_as_placeholder, #hide_caption, #hide_tooltip, #html_class, #link, #method, #nil_value, #on_changed, #only_for, #style, #surrounding_tag

Attributes inherited from Control

#parent

Instance Method Summary collapse

Methods included from HasControls

#add_control, #add_controls, included, #initialize, #siblings

Methods inherited from Attribute

#initialize, #render

Methods inherited from Control

#ancestors, build, definition, #find_attribute, #find_attribute!, inherited, #initialize, #render, #set_attributes, #set_defaults

Instance Method Details

#captionObject



9
10
11
# File 'lib/interview/container_attribute.rb', line 9

def caption
  return @caption.to_s
end

#render_readObject



17
18
19
20
21
22
23
# File 'lib/interview/container_attribute.rb', line 17

def render_read
  html = Builder::XmlMarkup.new
  @controls.each do |control|
    html << control.render
  end
  return html.target!
end

#render_writeObject



25
26
27
# File 'lib/interview/container_attribute.rb', line 25

def render_write
  render_read
end

#tooltipObject



13
14
15
# File 'lib/interview/container_attribute.rb', line 13

def tooltip
  return ''
end

#valueObject



5
6
7
# File 'lib/interview/container_attribute.rb', line 5

def value
  return nil
end