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 383

Instance Attribute Details

#badge_keyString

Returns the badge being done.

Returns:

  • (String)

    the badge being done



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

attribute :badge_key, :type => String

#badge_sectionSymbol

Returns the section type that the badge belongs to.

Returns:

  • (Symbol)

    the section type that the badge belongs to



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

attribute :badge_key, :type => String

#badge_typeSymbol

Returns the type of badge.

Returns:

  • (Symbol)

    the type of badge



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

attribute :badge_key, :type => String

#labelString

Returns human firendly label for the badge and requirement.

Returns:

  • (String)

    human firendly label for the badge and requirement



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

attribute :badge_key, :type => String

#requirement_keyString

Returns the requirement being done.

Returns:

  • (String)

    the requirement being done



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

attribute :badge_key, :type => String

Instance Method Details

#<=>(another) ⇒ Object

Compare BadgeLink based on title then activity_id



388
389
390
# File 'lib/osm/meeting.rb', line 388

def <=>(another)
  return self.label <=> another.try(:label)
end