Class: PgEventstore::Web::Subscriptions::WithState::SetCollection
- Inherits:
-
Object
- Object
- PgEventstore::Web::Subscriptions::WithState::SetCollection
- Defined in:
- lib/pg_eventstore/web/subscriptions/with_state/set_collection.rb,
sig/pg_eventstore/web/subscriptions/with_state/set_collection.rbs
Instance Attribute Summary collapse
-
#connection ⇒ PgEventstore::Connection
Returns the value of attribute connection.
Instance Method Summary collapse
-
#initialize(connection, state:) ⇒ SetCollection
constructor
A new instance of SetCollection.
- #names ⇒ Array<String>
- #subscription_queries ⇒ PgEventstore::SubscriptionQueries
Constructor Details
#initialize(connection, state:) ⇒ SetCollection
Returns a new instance of SetCollection.
15 16 17 18 |
# File 'lib/pg_eventstore/web/subscriptions/with_state/set_collection.rb', line 15 def initialize(connection, state:) @connection = connection @state = state end |
Instance Attribute Details
#connection ⇒ PgEventstore::Connection
Returns the value of attribute connection.
10 11 12 |
# File 'lib/pg_eventstore/web/subscriptions/with_state/set_collection.rb', line 10 def connection @connection end |
Instance Method Details
#names ⇒ Array<String>
21 22 23 |
# File 'lib/pg_eventstore/web/subscriptions/with_state/set_collection.rb', line 21 def names @names ||= subscription_queries.set_collection(@state) end |
#subscription_queries ⇒ PgEventstore::SubscriptionQueries
28 29 30 |
# File 'lib/pg_eventstore/web/subscriptions/with_state/set_collection.rb', line 28 def subscription_queries SubscriptionQueries.new(connection, QueryStrategy::Foreground.new(connection)) end |