Class: PersistedQueries::Operations::Syncer

Inherits:
Object
  • Object
show all
Defined in:
lib/persisted_queries/syncer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(queries:, client_name:) ⇒ Syncer

Returns a new instance of Syncer.



7
8
9
10
# File 'lib/persisted_queries/syncer.rb', line 7

def initialize(queries:, client_name:)
  @queries = queries
  @client_name = client_name
end

Instance Attribute Details

#client_nameObject (readonly)

Returns the value of attribute client_name.



6
7
8
# File 'lib/persisted_queries/syncer.rb', line 6

def client_name
  @client_name
end

#queriesObject (readonly)

Returns the value of attribute queries.



6
7
8
# File 'lib/persisted_queries/syncer.rb', line 6

def queries
  @queries
end

Instance Method Details

#performObject



12
13
14
# File 'lib/persisted_queries/syncer.rb', line 12

def perform
  FileUtils.mkdir(client_path) unless client_path.exist?
end