Sha256: 7e4c67923a728806f5b684723619eebe8ae9b46c806e3fc75db580fcef9df6bc

Contents?: true

Size: 793 Bytes

Versions: 17

Compression:

Stored size: 793 Bytes

Contents

module Shamu
  module Events
    module ActiveRecord

      # Registry of event channels.
      class Channel < ::ActiveRecord::Base

        self.table_name = "shamu_event_channels"

        # ============================================================================
        # @!group Attributes
        #

        # @!attribute
        # @return [String] name of the channel.

        #
        # @!endgroup Attributes

        # ============================================================================
        # @!group Scope
        #

        # @!attribute
        # @return [ActiveRecord::Relation] messages posted to the given channel.
        scope :by_name, ->( name ) {
          where( name: name )
        }

        #
        # @!endgroup Scope

      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
shamu-0.0.24 lib/shamu/events/active_record/channel.rb
shamu-0.0.21 lib/shamu/events/active_record/channel.rb
shamu-0.0.20 lib/shamu/events/active_record/channel.rb
shamu-0.0.19 lib/shamu/events/active_record/channel.rb
shamu-0.0.18 lib/shamu/events/active_record/channel.rb
shamu-0.0.17 lib/shamu/events/active_record/channel.rb
shamu-0.0.15 lib/shamu/events/active_record/channel.rb
shamu-0.0.14 lib/shamu/events/active_record/channel.rb
shamu-0.0.13 lib/shamu/events/active_record/channel.rb
shamu-0.0.11 lib/shamu/events/active_record/channel.rb
shamu-0.0.9 lib/shamu/events/active_record/channel.rb
shamu-0.0.8 lib/shamu/events/active_record/channel.rb
shamu-0.0.7 lib/shamu/events/active_record/channel.rb
shamu-0.0.5 lib/shamu/events/active_record/channel.rb
shamu-0.0.4 lib/shamu/events/active_record/channel.rb
shamu-0.0.3 lib/shamu/events/active_record/channel.rb
shamu-0.0.2 lib/shamu/events/active_record/channel.rb