Class: Osm::Activity::File
- Inherits:
-
Object
- Object
- Osm::Activity::File
- Includes:
- ActiveAttr::Model, ActiveModel::MassAssignmentSecurity
- Defined in:
- lib/osm/activity.rb,
lib/osm/activity.rb
Overview
Ensure the constant exists for the validators
Instance Attribute Summary collapse
-
#activity_id ⇒ Fixnum
The OSM ID for the activity.
-
#file_name ⇒ String
The file name of the file.
-
#id ⇒ Fixnum
The OSM ID for the file.
-
#name ⇒ String
The name of the file (more human readable than file_name).
Instance Method Summary collapse
-
#<=>(another) ⇒ Object
Compare File based on activity_id then name.
-
#initialize ⇒ Object
constructor
Initialize a new Term.
Constructor Details
#initialize ⇒ Object
Initialize a new Term
|
# File 'lib/osm/activity.rb', line 313
|
Instance Attribute Details
#activity_id ⇒ Fixnum
Returns the OSM ID for the activity.
299 |
# File 'lib/osm/activity.rb', line 299 attribute :id, :type => Integer |
#file_name ⇒ String
Returns the file name of the file.
299 |
# File 'lib/osm/activity.rb', line 299 attribute :id, :type => Integer |
#id ⇒ Fixnum
Returns the OSM ID for the file.
299 |
# File 'lib/osm/activity.rb', line 299 attribute :id, :type => Integer |
#name ⇒ String
Returns the name of the file (more human readable than file_name).
299 |
# File 'lib/osm/activity.rb', line 299 attribute :id, :type => Integer |
Instance Method Details
#<=>(another) ⇒ Object
Compare File based on activity_id then name
318 319 320 321 322 |
# File 'lib/osm/activity.rb', line 318 def <=>(another) result = self.activity_id <=> another.try(:activity_id) result = self.name <=> another.try(:name) if result == 0 return result end |