Class: Osm::Event::BadgeLink
- Includes:
- ActiveAttr::Model, ActiveModel::MassAssignmentSecurity
- Defined in:
- lib/osm/event.rb,
lib/osm/event.rb
Overview
TODO : Add validation for above statements
Instance Attribute Summary collapse
-
#badge_key ⇒ String
The badge being done.
-
#badge_section ⇒ Symbol
The section type that the badge belongs to.
-
#badge_type ⇒ Symbol
The type of badge.
-
#data ⇒ String
What to put in the column when the badge records are updated.
-
#label ⇒ String
Human firendly label for the badge and requirement.
-
#requirement_key ⇒ String
The requirement being done.
Instance Method Summary collapse
-
#<=>(another) ⇒ Object
Compare BadgeLink based on section, type, key, requirement, data.
-
#initialize ⇒ Object
constructor
Initialize a new Meeting::Activity.
Methods inherited from Model
#<, #<=, #>, #>=, #between?, #changed_attributes, configure, #reset_changed_attributes, #to_i
Constructor Details
#initialize ⇒ Object
Initialize a new Meeting::Activity
|
# File 'lib/osm/event.rb', line 610
|
Instance Attribute Details
#badge_key ⇒ String
Returns the badge being done.
594 |
# File 'lib/osm/event.rb', line 594 attribute :badge_key, :type => String |
#badge_section ⇒ Symbol
Returns the section type that the badge belongs to.
594 |
# File 'lib/osm/event.rb', line 594 attribute :badge_key, :type => String |
#badge_type ⇒ Symbol
Returns the type of badge.
594 |
# File 'lib/osm/event.rb', line 594 attribute :badge_key, :type => String |
#data ⇒ String
Returns what to put in the column when the badge records are updated.
594 |
# File 'lib/osm/event.rb', line 594 attribute :badge_key, :type => String |
#label ⇒ String
Returns human firendly label for the badge and requirement.
594 |
# File 'lib/osm/event.rb', line 594 attribute :badge_key, :type => String |
#requirement_key ⇒ String
Returns the requirement being done.
594 |
# File 'lib/osm/event.rb', line 594 attribute :badge_key, :type => String |
Instance Method Details
#<=>(another) ⇒ Object
Compare BadgeLink based on section, type, key, requirement, data
615 616 617 618 619 620 621 |
# File 'lib/osm/event.rb', line 615 def <=>(another) [:badge_section, :badge_type, :badge_key, :requirement_key].each do |attribute| result = self.try(:data) <=> another.try(:data) return result unless result == 0 end return self.try(:data) <=> another.try(:data) end |