Class: Osm::Activity::Version
- Inherits:
-
Object
- Object
- Osm::Activity::Version
- Includes:
- ActiveAttr::Model, ActiveModel::MassAssignmentSecurity
- Defined in:
- lib/osm/activity.rb,
lib/osm/activity.rb
Overview
Class Activity::Badge
Instance Attribute Summary collapse
-
#created_by ⇒ Fixnum
The OSM user ID of the person who created this version.
-
#created_by_name ⇒ String
The aname of the OSM user who created this version.
-
#label ⇒ String
The human readable label to use for this version.
-
#version ⇒ Fixnum
The version of the activity.
Instance Method Summary collapse
-
#<=>(another) ⇒ Object
Compare Version based on activity_id then version.
-
#initialize ⇒ Object
constructor
Initialize a new Version.
Constructor Details
#initialize ⇒ Object
Initialize a new Version
|
# File 'lib/osm/activity.rb', line 404
|
Instance Attribute Details
#created_by ⇒ Fixnum
Returns the OSM user ID of the person who created this version.
390 |
# File 'lib/osm/activity.rb', line 390 attribute :version, :type => Integer |
#created_by_name ⇒ String
Returns the aname of the OSM user who created this version.
390 |
# File 'lib/osm/activity.rb', line 390 attribute :version, :type => Integer |
#label ⇒ String
Returns the human readable label to use for this version.
390 |
# File 'lib/osm/activity.rb', line 390 attribute :version, :type => Integer |
#version ⇒ Fixnum
Returns the version of the activity.
390 |
# File 'lib/osm/activity.rb', line 390 attribute :version, :type => Integer |
Instance Method Details
#<=>(another) ⇒ Object
Compare Version based on activity_id then version
409 410 411 412 413 |
# File 'lib/osm/activity.rb', line 409 def <=>(another) result = self.activity_id <=> another.try(:activity_id) result = self.version <=> another.try(:version) if result == 0 return result end |