Sha256: 9bdc968c3e917303d01c648e7ea0cc76719e13785c9da90cb2ea5a470af3f3ea

Contents?: true

Size: 586 Bytes

Versions: 11

Compression:

Stored size: 586 Bytes

Contents

module BitPlayer
  # Persistent data representing the Participant's navigation state.
  class ParticipantStatus < ActiveRecord::Base
    belongs_to :participant

    def initialize_context(name)
      update(
        context: name,
        module_position: 1,
        provider_position: 1,
        content_position: 1
      )
    end

    def increment_content_position
      update(content_position: content_position + 1)
    end

    def increment_provider_position
      update(
        provider_position: provider_position + 1,
        content_position: 1
      )
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
bit_player-0.4.3 app/models/bit_player/participant_status.rb
bit_player-0.4.2 app/models/bit_player/participant_status.rb
bit_player-0.4.1 app/models/bit_player/participant_status.rb
bit_player-0.4.0 app/models/bit_player/participant_status.rb
bit_player-0.3.0 app/models/bit_player/participant_status.rb
bit_player-0.2.5 app/models/bit_player/participant_status.rb
bit_player-0.2.3 app/models/bit_player/participant_status.rb
bit_player-0.2.2 app/models/bit_player/participant_status.rb
bit_player-0.2.1 app/models/bit_player/participant_status.rb
bit_player-0.2.0 app/models/bit_player/participant_status.rb
bit_player-0.1.4 app/models/bit_player/participant_status.rb