Class: PgEventstore::Web::Subscriptions::SubscriptionsSet

Inherits:
Object
  • Object
show all
Defined in:
lib/pg_eventstore/web/subscriptions/subscriptions_set.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(connection, current_set) ⇒ SubscriptionsSet

Returns a new instance of SubscriptionsSet.

Parameters:



14
15
16
17
# File 'lib/pg_eventstore/web/subscriptions/subscriptions_set.rb', line 14

def initialize(connection, current_set)
  @connection = connection
  @current_set = current_set
end

Instance Attribute Details

#connection=(value) ⇒ PgEventstore::Connection



9
10
11
# File 'lib/pg_eventstore/web/subscriptions/subscriptions_set.rb', line 9

def connection
  @connection
end

Instance Method Details

#subscriptions_setArray<PgEventstore::SubscriptionsSet>

Returns:



20
21
22
23
24
# File 'lib/pg_eventstore/web/subscriptions/subscriptions_set.rb', line 20

def subscriptions_set
  @subscriptions_set ||= subscriptions_set_queries.find_all(name: @current_set).map do |attrs|
    PgEventstore::SubscriptionsSet.new(**attrs)
  end
end