Class: FormObjectModel::Field

Inherits:
Struct
  • Object
show all
Defined in:
lib/form_object_model/field.rb

Direct Known Subclasses

RadioField, SelectField, TextField

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#locatorObject

Returns the value of attribute locator

Returns:

  • (Object)

    the current value of locator



2
3
4
# File 'lib/form_object_model/field.rb', line 2

def locator
  @locator
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



2
3
4
# File 'lib/form_object_model/field.rb', line 2

def name
  @name
end

#pageObject

Returns the value of attribute page

Returns:

  • (Object)

    the current value of page



2
3
4
# File 'lib/form_object_model/field.rb', line 2

def page
  @page
end

Instance Method Details

#==(other) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/form_object_model/field.rb', line 3

def ==(other)
  if respond_to?(:has_value?)
    has_value? other
  else
    super
  end
end