Class: Scenic::Adapters::Postgres::RefreshDependencies

Inherits:
Object
  • Object
show all
Defined in:
lib/scenic/adapters/postgres/refresh_dependencies.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, adapter, connection) ⇒ RefreshDependencies

Returns a new instance of RefreshDependencies



9
10
11
12
13
# File 'lib/scenic/adapters/postgres/refresh_dependencies.rb', line 9

def initialize(name, adapter, connection)
  @name = name
  @adapter = adapter
  @connection = connection
end

Class Method Details

.call(name, adapter, connection) ⇒ Object



5
6
7
# File 'lib/scenic/adapters/postgres/refresh_dependencies.rb', line 5

def self.call(name, adapter, connection)
  new(name, adapter, connection).call
end

Instance Method Details

#callObject



15
16
17
18
19
# File 'lib/scenic/adapters/postgres/refresh_dependencies.rb', line 15

def call
  dependencies.each do |dependency|
    adapter.refresh_materialized_view(dependency)
  end
end