Class: Interview::HtmlControl

Inherits:
Control
  • Object
show all
Defined in:
lib/interview/html_control.rb

Instance Attribute Summary

Attributes inherited from Control

#parent

Instance Method Summary collapse

Methods inherited from Control

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

Constructor Details

#initialize(params = {}) {|@html| ... } ⇒ HtmlControl

Returns a new instance of HtmlControl.

Yields:

  • (@html)


4
5
6
7
8
# File 'lib/interview/html_control.rb', line 4

def initialize(params={}, &block)
  super
  @html = Builder::XmlMarkup.new
  yield @html
end

Instance Method Details

#renderObject



10
11
12
# File 'lib/interview/html_control.rb', line 10

def render
  return @html.target!
end