Class: Osm::Meeting::Activity

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 359

Instance Attribute Details

#activity_idFixnum

Returns the activity being done.

Returns:

  • (Fixnum)

    the activity being done


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

attribute :activity_id, :type => Integer

#notesString

Returns notes relevant to doing this activity on this meeting.

Returns:

  • (String)

    notes relevant to doing this activity on this meeting


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

attribute :activity_id, :type => Integer

#titleString

Returns the activity's title.

Returns:

  • (String)

    the activity's title


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

attribute :activity_id, :type => Integer

Instance Method Details

#<=>(another) ⇒ Object

Compare Activity based on title then activity_id


364
365
366
367
368
# File 'lib/osm/meeting.rb', line 364

def <=>(another)
  result = self.title <=> another.try(:title)
  result = self.activity_id <=> another.try(:activity_id) if result == 0
  return result
end