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 377

Instance Attribute Details

#badge_keyString

Returns the badge being done.

Returns:

  • (String)

    the badge being done



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

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



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

attribute :badge_key, :type => String

#badge_typeSymbol

Returns the type of badge.

Returns:

  • (Symbol)

    the type of badge



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

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



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

attribute :badge_key, :type => String

#requirement_keyString

Returns the requirement being done.

Returns:

  • (String)

    the requirement being done



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

attribute :badge_key, :type => String

Instance Method Details

#<=>(another) ⇒ Object

Compare BadgeLink based on title then activity_id



382
383
384
# File 'lib/osm/meeting.rb', line 382

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