Class: DiscoApp::SynchroniseResourcesService
- Inherits:
-
Object
- Object
- DiscoApp::SynchroniseResourcesService
- Defined in:
- app/services/disco_app/synchronise_resources_service.rb
Constant Summary collapse
- PAGE_LIMIT =
250
Instance Attribute Summary collapse
-
#class_name ⇒ Object
readonly
Returns the value of attribute class_name.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#shop ⇒ Object
readonly
Returns the value of attribute shop.
-
#since_id ⇒ Object
readonly
Returns the value of attribute since_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(shop, class_name, params, since_id) ⇒ SynchroniseResourcesService
constructor
A new instance of SynchroniseResourcesService.
- #synchronise_all ⇒ Object
Constructor Details
#initialize(shop, class_name, params, since_id) ⇒ SynchroniseResourcesService
Returns a new instance of SynchroniseResourcesService.
12 13 14 15 16 17 |
# File 'app/services/disco_app/synchronise_resources_service.rb', line 12 def initialize(shop, class_name, params, since_id) @shop = shop @class_name = class_name @params = params @since_id = since_id end |
Instance Attribute Details
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name.
6 7 8 |
# File 'app/services/disco_app/synchronise_resources_service.rb', line 6 def class_name @class_name end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
6 7 8 |
# File 'app/services/disco_app/synchronise_resources_service.rb', line 6 def params @params end |
#shop ⇒ Object (readonly)
Returns the value of attribute shop.
6 7 8 |
# File 'app/services/disco_app/synchronise_resources_service.rb', line 6 def shop @shop end |
#since_id ⇒ Object (readonly)
Returns the value of attribute since_id.
6 7 8 |
# File 'app/services/disco_app/synchronise_resources_service.rb', line 6 def since_id @since_id end |
Class Method Details
.synchronise_all(shop, class_name, params, since_id = 0) ⇒ Object
8 9 10 |
# File 'app/services/disco_app/synchronise_resources_service.rb', line 8 def self.synchronise_all(shop, class_name, params, since_id = 0) new(shop, class_name, params, since_id).synchronise_all end |
Instance Method Details
#synchronise_all ⇒ Object
19 20 21 22 |
# File 'app/services/disco_app/synchronise_resources_service.rb', line 19 def synchronise_all synchronise_page finish_or_loop end |