Class: Osm::Activity::Badge
- Inherits:
-
Object
- Object
- Osm::Activity::Badge
- Includes:
- ActiveAttr::Model, ActiveModel::MassAssignmentSecurity
- Defined in:
- lib/osm/activity.rb,
lib/osm/activity.rb
Overview
Class Activity::File
Instance Attribute Summary collapse
-
#badge_id ⇒ Fixnum
The badge’s ID in OSM.
-
#badge_name ⇒ String
The badge’s name.
-
#badge_section ⇒ Symbol
The section type that the badge belongs to.
-
#badge_type ⇒ Symbol
The type of badge.
-
#badge_version ⇒ Fixnum
The version of the badge.
-
#data ⇒ String
What to put in the column when the badge records are updated.
-
#requirement_id ⇒ Fixnum
The requirement’s ID in OSM.
-
#requirement_label ⇒ String
Human firendly requirement label.
Instance Method Summary collapse
-
#<=>(another) ⇒ Object
Compare BadgeLink based on section, type, badge_name, requirement_label, data.
-
#initialize ⇒ Object
constructor
Initialize a new Meeting::Activity.
Constructor Details
#initialize ⇒ Object
Initialize a new Meeting::Activity
|
# File 'lib/osm/activity.rb', line 362
|
Instance Attribute Details
#badge_id ⇒ Fixnum
Returns the badge’s ID in OSM.
342 |
# File 'lib/osm/activity.rb', line 342 attribute :badge_type, :type => Object |
#badge_name ⇒ String
Returns the badge’s name.
342 |
# File 'lib/osm/activity.rb', line 342 attribute :badge_type, :type => Object |
#badge_section ⇒ Symbol
Returns the section type that the badge belongs to.
342 |
# File 'lib/osm/activity.rb', line 342 attribute :badge_type, :type => Object |
#badge_type ⇒ Symbol
Returns the type of badge.
342 |
# File 'lib/osm/activity.rb', line 342 attribute :badge_type, :type => Object |
#badge_version ⇒ Fixnum
Returns the version of the badge.
342 |
# File 'lib/osm/activity.rb', line 342 attribute :badge_type, :type => Object |
#data ⇒ String
Returns what to put in the column when the badge records are updated.
342 |
# File 'lib/osm/activity.rb', line 342 attribute :badge_type, :type => Object |
#requirement_id ⇒ Fixnum
Returns the requirement’s ID in OSM.
342 |
# File 'lib/osm/activity.rb', line 342 attribute :badge_type, :type => Object |
#requirement_label ⇒ String
Returns human firendly requirement label.
342 |
# File 'lib/osm/activity.rb', line 342 attribute :badge_type, :type => Object |
Instance Method Details
#<=>(another) ⇒ Object
Compare BadgeLink based on section, type, badge_name, requirement_label, data
367 368 369 370 371 372 373 |
# File 'lib/osm/activity.rb', line 367 def <=>(another) [:badge_section, :badge_type, :badge_name, :requirement_label].each do |attribute| result = self.try(:data) <=> another.try(:data) return result unless result == 0 end return self.try(:data) <=> another.try(:data) end |