Class: Formation::Types::TextArea

Inherits:
Object
  • Object
show all
Defined in:
lib/formation/types/text_area.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(field) ⇒ TextArea

Returns a new instance of TextArea.



5
6
7
# File 'lib/formation/types/text_area.rb', line 5

def initialize(field)
  @field = field
end

Instance Attribute Details

#fieldObject (readonly)

Returns the value of attribute field.



3
4
5
# File 'lib/formation/types/text_area.rb', line 3

def field
  @field
end

Instance Method Details

#to_htmlObject



9
10
11
12
13
# File 'lib/formation/types/text_area.rb', line 9

def to_html
  <<-HTML.strip
    <textarea name="#{field.name}">#{field.value}</textarea>
  HTML
end