Class: Osm::Meeting::BadgeLink

Inherits:
Object
  • Object
show all
Includes:
ActiveAttr::Model, ActiveModel::MassAssignmentSecurity
Defined in:
lib/osm/meeting.rb,
lib/osm/meeting.rb

Overview

Ensure the constant exists for the validators

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Initialize a new Meeting::Activity

Parameters:

  • attributes (Hash)

    The hash of attributes (see attributes for descriptions, use Symbol of attribute name as the key)



# File 'lib/osm/meeting.rb', line 411

Instance Attribute Details

#badge_idFixnum

Returns the badge’s ID in OSM.

Returns:

  • (Fixnum)

    the badge’s ID in OSM



391
# File 'lib/osm/meeting.rb', line 391

attribute :badge_type, :type => Object

#badge_nameString

Returns the badge’s name.

Returns:

  • (String)

    the badge’s name



391
# File 'lib/osm/meeting.rb', line 391

attribute :badge_type, :type => Object

#badge_sectionSymbol

Returns the section type that the badge belongs to.

Returns:

  • (Symbol)

    the section type that the badge belongs to



391
# File 'lib/osm/meeting.rb', line 391

attribute :badge_type, :type => Object

#badge_typeSymbol

Returns the type of badge.

Returns:

  • (Symbol)

    the type of badge



391
# File 'lib/osm/meeting.rb', line 391

attribute :badge_type, :type => Object

#badge_versionFixnum

Returns the version of the badge.

Returns:

  • (Fixnum)

    the version of the badge



391
# File 'lib/osm/meeting.rb', line 391

attribute :badge_type, :type => Object

#dataString

Returns what to put in the column when the badge records are updated.

Returns:

  • (String)

    what to put in the column when the badge records are updated



391
# File 'lib/osm/meeting.rb', line 391

attribute :badge_type, :type => Object

#requirement_idFixnum

Returns the requirement’s ID in OSM.

Returns:

  • (Fixnum)

    the requirement’s ID in OSM



391
# File 'lib/osm/meeting.rb', line 391

attribute :badge_type, :type => Object

#requirement_labelString

Returns human firendly requirement label.

Returns:

  • (String)

    human firendly requirement label



391
# File 'lib/osm/meeting.rb', line 391

attribute :badge_type, :type => Object

Instance Method Details

#<=>(another) ⇒ Object

Compare BadgeLink based on section, type, badge_name, requirement_label, data



416
417
418
419
420
421
422
# File 'lib/osm/meeting.rb', line 416

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