Class: Osm::Activity::File

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initializeObject

Initialize a new Term



# File 'lib/osm/activity.rb', line 295


Instance Attribute Details

#activity_idFixnum



281
# File 'lib/osm/activity.rb', line 281

attribute :id, :type => Integer

#file_nameString



281
# File 'lib/osm/activity.rb', line 281

attribute :id, :type => Integer

#idFixnum



281
# File 'lib/osm/activity.rb', line 281

attribute :id, :type => Integer

#nameString



281
# File 'lib/osm/activity.rb', line 281

attribute :id, :type => Integer

Instance Method Details

#<=>(another) ⇒ Object

Compare File based on activity_id then name



300
301
302
303
304
# File 'lib/osm/activity.rb', line 300

def <=>(another)
  result = self.activity_id <=> another.try(:activity_id)
  result = self.name <=> another.try(:name) if result == 0
  return result
end