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_label ⇒ String
Human friendly badge name.
-
#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.
-
#requirement_key ⇒ String
The requirement being done.
-
#requirement_label ⇒ String
Human firendly requirement label.
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 613
|
Instance Attribute Details
#badge_key ⇒ String
Returns the badge being done.
596 |
# File 'lib/osm/event.rb', line 596 attribute :badge_key, :type => String |
#badge_label ⇒ String
Returns human friendly badge name.
596 |
# File 'lib/osm/event.rb', line 596 attribute :badge_key, :type => String |
#badge_section ⇒ Symbol
Returns the section type that the badge belongs to.
596 |
# File 'lib/osm/event.rb', line 596 attribute :badge_key, :type => String |
#badge_type ⇒ Symbol
Returns the type of badge.
596 |
# File 'lib/osm/event.rb', line 596 attribute :badge_key, :type => String |
#data ⇒ String
Returns what to put in the column when the badge records are updated.
596 |
# File 'lib/osm/event.rb', line 596 attribute :badge_key, :type => String |
#requirement_key ⇒ String
Returns the requirement being done.
596 |
# File 'lib/osm/event.rb', line 596 attribute :badge_key, :type => String |
#requirement_label ⇒ String
Returns human firendly requirement label.
596 |
# File 'lib/osm/event.rb', line 596 attribute :badge_key, :type => String |
Instance Method Details
#<=>(another) ⇒ Object
Compare BadgeLink based on section, type, key, requirement, data
618 619 620 621 622 623 624 |
# File 'lib/osm/event.rb', line 618 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 |