Class: Formidable::Elements::Button

Inherits:
Element show all
Defined in:
lib/formidable/elements.rb

Constant Summary

Constants included from Coercions

Coercions::IncompatibleInterface, Coercions::MissingCoercion

Constants included from Rendering

Rendering::RendererNotAssigned

Instance Attribute Summary

Attributes inherited from BasicElement

#attributes, #cleaned_data, #content, #name, #raw_data, #tag

Attributes included from Rendering

#renderer

Instance Method Summary collapse

Methods included from Coercions

#cleaned_data, #coerce, #coerce!, #coercions, coercions, included

Methods included from Validations

#errors, register_validation, #valid?, #validate, #validations

Methods included from Rendering

included, #render

Constructor Details

#initialize(attributes = Hash.new, &block) ⇒ Button

Returns a new instance of Button.



206
207
208
209
# File 'lib/formidable/elements.rb', line 206

def initialize(attributes = Hash.new, &block)
  self.content = block.call
  super(:button, nil, attributes)
end