Module: ROM::Command::Restrictable

Extended by:
Notifications::Listener
Included in:
ROM::Command
Defined in:
lib/rom/compat/command.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.subscribe(event_id, query = EMPTY_HASH, &block) ⇒ Object Originally defined in module Notifications::Listener

Subscribe to events

Parameters:

  • event_id (String)

    The event key

  • query (Hash) (defaults to: EMPTY_HASH)

    An optional event filter

Returns:

  • (Object)

    self

Instance Method Details

#create_class(relation: nil, &block) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



20
21
22
23
24
# File 'lib/rom/compat/command.rb', line 20

def create_class(relation: nil, **, &block)
  klass = super
  klass.extend_for_relation(relation) if relation && klass.restrictable
  klass
end