Class: Synced::Strategies::Check::Result
- Inherits:
-
Object
- Object
- Synced::Strategies::Check::Result
- Defined in:
- lib/synced/strategies/check.rb,
lib/synced/result_presenter.rb
Overview
Represents result of synchronization integrity check
Instance Attribute Summary collapse
-
#additional ⇒ Object
Returns the value of attribute additional.
-
#changed ⇒ Object
Returns the value of attribute changed.
-
#missing ⇒ Object
Returns the value of attribute missing.
-
#model_class ⇒ Object
Returns the value of attribute model_class.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(model_class = nil, options = {}) ⇒ Result
constructor
A new instance of Result.
- #passed? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(model_class = nil, options = {}) ⇒ Result
65 66 67 68 69 |
# File 'lib/synced/strategies/check.rb', line 65 def initialize(model_class = nil, = {}) @model_class = model_class = @changed, @missing, @additional = [], [], [] end |
Instance Attribute Details
#additional ⇒ Object
Returns the value of attribute additional.
63 64 65 |
# File 'lib/synced/strategies/check.rb', line 63 def additional @additional end |
#changed ⇒ Object
Returns the value of attribute changed.
63 64 65 |
# File 'lib/synced/strategies/check.rb', line 63 def changed @changed end |
#missing ⇒ Object
Returns the value of attribute missing.
63 64 65 |
# File 'lib/synced/strategies/check.rb', line 63 def missing @missing end |
#model_class ⇒ Object
Returns the value of attribute model_class.
63 64 65 |
# File 'lib/synced/strategies/check.rb', line 63 def model_class @model_class end |
#options ⇒ Object
Returns the value of attribute options.
63 64 65 |
# File 'lib/synced/strategies/check.rb', line 63 def end |
Instance Method Details
#passed? ⇒ Boolean
71 72 73 |
# File 'lib/synced/strategies/check.rb', line 71 def passed? changed.empty? && missing.empty? && additional.empty? end |
#to_s ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/synced/result_presenter.rb', line 5 def to_s %Q{ #{line "synced_class", model_class} #{line "options", options} #{line "changed count", changed.size} #{line "additional count", additional.size} #{line "missing count", missing.size} #{line "changed", changed} #{line "additional", additional} #{line "missing", missing} } end |