Class: Stratagem::Model::Component::FormField

Inherits:
Object
  • Object
show all
Defined in:
lib/stratagem/model/components/view.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, field_type) ⇒ FormField

Returns a new instance of FormField.



176
177
178
179
# File 'lib/stratagem/model/components/view.rb', line 176

def initialize(name, field_type)
  @name = name
  @field_type = field_type
end

Instance Attribute Details

#field_typeObject (readonly)

Returns the value of attribute field_type.



174
175
176
# File 'lib/stratagem/model/components/view.rb', line 174

def field_type
  @field_type
end

#nameObject (readonly)

Returns the value of attribute name.



174
175
176
# File 'lib/stratagem/model/components/view.rb', line 174

def name
  @name
end

Instance Method Details

#exportObject



181
182
183
# File 'lib/stratagem/model/components/view.rb', line 181

def export
  {:name => @name, :field_type => @field_type }
end