Class: Harmonize::Strategies::Strategy
- Inherits:
-
Object
- Object
- Harmonize::Strategies::Strategy
- Defined in:
- lib/harmonize/strategies/strategy.rb
Direct Known Subclasses
Instance Attribute Summary (collapse)
-
- (Object) harmonize_log
Returns the value of attribute harmonize_log.
-
- (Object) harmonizer
Returns the value of attribute harmonizer.
-
- (Object) sources
Returns the value of attribute sources.
-
- (Object) targets
Returns the value of attribute targets.
Instance Method Summary (collapse)
- - (Object) harmonize(attributes)
- - (Object) harmonize!
-
- (Strategy) initialize(attributes = {})
constructor
A new instance of Strategy.
Constructor Details
- (Strategy) initialize(attributes = {})
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
- (Object) harmonize_log
Returns the value of attribute harmonize_log
5 6 7 |
# File 'lib/harmonize/strategies/strategy.rb', line 5 def harmonize_log @harmonize_log end |
- (Object) harmonizer
Returns the value of attribute harmonizer
5 6 7 |
# File 'lib/harmonize/strategies/strategy.rb', line 5 def harmonizer @harmonizer end |
- (Object) sources
Returns the value of attribute sources
5 6 7 |
# File 'lib/harmonize/strategies/strategy.rb', line 5 def sources @sources end |
- (Object) targets
Returns the value of attribute targets
5 6 7 |
# File 'lib/harmonize/strategies/strategy.rb', line 5 def targets @targets end |
Instance Method Details
- (Object) harmonize(attributes)
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 |
- (Object) harmonize!
18 19 |
# File 'lib/harmonize/strategies/strategy.rb', line 18 def harmonize! end |