Class: GcalMapper::Sync
- Inherits:
-
Object
- Object
- GcalMapper::Sync
- Defined in:
- lib/gcal_mapper/sync.rb
Overview
Provide methods to synch google calendar and local bd
Class Method Summary collapse
-
.sync(config, base) ⇒ Object
proxy to call sync methods and set new instance.
Instance Method Summary collapse
-
#initialize(config, base) ⇒ Sync
constructor
new Sync object.
-
#sync_gcal ⇒ Object
full synchronization step by step.
Constructor Details
#initialize(config, base) ⇒ Sync
new Sync object
19 20 21 22 |
# File 'lib/gcal_mapper/sync.rb', line 19 def initialize(config, base) @config = config @base = base end |
Class Method Details
.sync(config, base) ⇒ Object
proxy to call sync methods and set new instance
11 12 13 |
# File 'lib/gcal_mapper/sync.rb', line 11 def self.sync(config, base) new(config, base).sync_gcal end |
Instance Method Details
#sync_gcal ⇒ Object
full synchronization step by step
26 27 28 29 30 |
# File 'lib/gcal_mapper/sync.rb', line 26 def sync_gcal authenticate fetch_events save_events end |