Class: Harmonize::Strategies::Strategy
- Inherits:
-
Object
- Object
- Harmonize::Strategies::Strategy
- Defined in:
- lib/harmonize/strategies/strategy.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#harmonize_log ⇒ Object
Returns the value of attribute harmonize_log.
-
#harmonizer ⇒ Object
Returns the value of attribute harmonizer.
-
#sources ⇒ Object
Returns the value of attribute sources.
-
#targets ⇒ Object
Returns the value of attribute targets.
Instance Method Summary collapse
- #harmonize(attributes) ⇒ Object
- #harmonize! ⇒ Object
-
#initialize(attributes = {}) ⇒ Strategy
constructor
A new instance of Strategy.
Constructor Details
#initialize(attributes = {}) ⇒ Strategy
Returns a new instance of Strategy.
7 8 9 |
# File 'lib/harmonize/strategies/strategy.rb', line 7 def initialize(attributes = {}) update_attributes(attributes) end |
Instance Attribute Details
#harmonize_log ⇒ Object
Returns the value of attribute harmonize_log.
5 6 7 |
# File 'lib/harmonize/strategies/strategy.rb', line 5 def harmonize_log @harmonize_log end |
#harmonizer ⇒ Object
Returns the value of attribute harmonizer.
5 6 7 |
# File 'lib/harmonize/strategies/strategy.rb', line 5 def harmonizer @harmonizer end |
#sources ⇒ Object
Returns the value of attribute sources.
5 6 7 |
# File 'lib/harmonize/strategies/strategy.rb', line 5 def sources @sources end |
#targets ⇒ Object
Returns the value of attribute targets.
5 6 7 |
# File 'lib/harmonize/strategies/strategy.rb', line 5 def targets @targets end |
Instance Method Details
#harmonize(attributes) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/harmonize/strategies/strategy.rb', line 11 def harmonize(attributes) update_attributes(attributes) self.sources = harmonizer.source.call self.targets = harmonizer.target.call harmonize! end |
#harmonize! ⇒ Object
18 19 |
# File 'lib/harmonize/strategies/strategy.rb', line 18 def harmonize! end |