Class: MacAppSync::Defaults::Save
- Inherits:
-
Object
- Object
- MacAppSync::Defaults::Save
- Defined in:
- lib/mac_app_sync/defaults/save.rb
Instance Attribute Summary collapse
-
#domain_configs ⇒ Object
readonly
Returns the value of attribute domain_configs.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(config) ⇒ Save
constructor
A new instance of Save.
- #run ⇒ Object
Constructor Details
#initialize(config) ⇒ Save
Returns a new instance of Save.
10 11 12 |
# File 'lib/mac_app_sync/defaults/save.rb', line 10 def initialize(config) @domain_configs = parse_config(config) end |
Instance Attribute Details
#domain_configs ⇒ Object (readonly)
Returns the value of attribute domain_configs.
4 5 6 |
# File 'lib/mac_app_sync/defaults/save.rb', line 4 def domain_configs @domain_configs end |
Class Method Details
.run(config) ⇒ Object
6 7 8 |
# File 'lib/mac_app_sync/defaults/save.rb', line 6 def self.run(config) new(config).run end |
Instance Method Details
#run ⇒ Object
14 15 16 17 18 19 |
# File 'lib/mac_app_sync/defaults/save.rb', line 14 def run return if domain_configs.empty? persistence.reset! save_domains end |