Class: Osm::Register::Field

Inherits:
Model
  • Object
show all
Defined in:
lib/osm/register.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Model

#<, #<=, #>, #>=, #between?, #changed_attributes, configure, #reset_changed_attributes, #to_i

Constructor Details

#initializeObject

Initialize a new RegisterField

Parameters:

  • attributes (Hash)

    The hash of attributes (see attributes for descriptions, use Symbol of attribute name as the key)



# File 'lib/osm/register.rb', line 157

Instance Attribute Details

#idString

Returns OSM identifier for the field.

Returns:

  • (String)

    OSM identifier for the field



144
# File 'lib/osm/register.rb', line 144

attribute :id, :type => String

#nameString

Returns Human readable name for the field.

Returns:

  • (String)

    Human readable name for the field



144
# File 'lib/osm/register.rb', line 144

attribute :id, :type => String

#tooltipString

Returns Tooltip for the field.

Returns:

  • (String)

    Tooltip for the field



144
# File 'lib/osm/register.rb', line 144

attribute :id, :type => String

Instance Method Details

#<=>(another) ⇒ Object

Compare Field based on id then version



163
164
165
# File 'lib/osm/register.rb', line 163

def <=>(another)
  return self.id <=> another.try(:id)
end