Class: Ippon::Form::Field

Inherits:
Object
  • Object
show all
Defined in:
lib/ippon/form.rb

Direct Known Subclasses

BooleanField, HashField, StringField, StringsField

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#errorObject

Returns the value of attribute error.



6
7
8
# File 'lib/ippon/form.rb', line 6

def error
  @error
end

#inputObject

Returns the value of attribute input.



6
7
8
# File 'lib/ippon/form.rb', line 6

def input
  @input
end

#outputObject

Returns the value of attribute output.



6
7
8
# File 'lib/ippon/form.rb', line 6

def output
  @output
end

Instance Method Details

#each_param(key) {|key, @input| ... } ⇒ Object

Yields:



12
13
14
# File 'lib/ippon/form.rb', line 12

def each_param(key)
  yield key, @input
end

#fill_from_data(data, key) ⇒ Object

Raises:

  • (NotEmplementedError)


8
9
10
# File 'lib/ippon/form.rb', line 8

def fill_from_data(data, key)
  raise NotEmplementedError, "#{self.class} is unable to fill from data"
end