Class: PersistedQueries::Operations::Syncer
- Inherits:
-
Object
- Object
- PersistedQueries::Operations::Syncer
- Defined in:
- lib/persisted_queries/syncer.rb
Instance Attribute Summary collapse
-
#client_name ⇒ Object
readonly
Returns the value of attribute client_name.
-
#queries ⇒ Object
readonly
Returns the value of attribute queries.
Instance Method Summary collapse
-
#initialize(queries:, client_name:) ⇒ Syncer
constructor
A new instance of Syncer.
- #perform ⇒ Object
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_name ⇒ Object (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 |
#queries ⇒ Object (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
#perform ⇒ Object
12 13 14 |
# File 'lib/persisted_queries/syncer.rb', line 12 def perform FileUtils.mkdir(client_path) unless client_path.exist? end |