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.



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

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.



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

def field_type
  @field_type
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

Instance Method Details

#exportObject



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

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