Class: SyncIssues::LabelSync
- Inherits:
-
Object
- Object
- SyncIssues::LabelSync
- Defined in:
- lib/sync_issues/label_sync.rb
Overview
Synchronizer is responsible for the actual synchronization.
Instance Attribute Summary collapse
-
#do_work ⇒ Object
readonly
Returns the value of attribute do_work.
-
#keep_existing ⇒ Object
readonly
Returns the value of attribute keep_existing.
-
#labels ⇒ Object
readonly
Returns the value of attribute labels.
Instance Method Summary collapse
-
#initialize(github, file_yaml) ⇒ LabelSync
constructor
A new instance of LabelSync.
- #synchronize(repository) ⇒ Object
Constructor Details
#initialize(github, file_yaml) ⇒ LabelSync
Returns a new instance of LabelSync.
9 10 11 12 13 |
# File 'lib/sync_issues/label_sync.rb', line 9 def initialize(github, file_yaml) @github = github @labels = @keep_existing = nil @do_work = file_yaml.nil? ? false : parse_yaml(file_yaml) end |
Instance Attribute Details
#do_work ⇒ Object (readonly)
Returns the value of attribute do_work.
7 8 9 |
# File 'lib/sync_issues/label_sync.rb', line 7 def do_work @do_work end |
#keep_existing ⇒ Object (readonly)
Returns the value of attribute keep_existing.
7 8 9 |
# File 'lib/sync_issues/label_sync.rb', line 7 def keep_existing @keep_existing end |
#labels ⇒ Object (readonly)
Returns the value of attribute labels.
7 8 9 |
# File 'lib/sync_issues/label_sync.rb', line 7 def labels @labels end |
Instance Method Details
#synchronize(repository) ⇒ Object
15 16 17 18 19 |
# File 'lib/sync_issues/label_sync.rb', line 15 def synchronize(repository) return unless @do_work existing = existing_labels(repository) make_changes(existing, repository) end |