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


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

Instance Attribute Details

#idString


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

attribute :id, :type => String

#nameString


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

attribute :id, :type => String

#tooltipString


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