Class: Harmonize::Strategies::Strategy

Inherits:
Object
  • Object
show all
Defined in:
lib/harmonize/strategies/strategy.rb

Direct Known Subclasses

BasicCrudStrategy

Instance Attribute Summary collapse

Instance Method Summary collapse

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_logObject

Returns the value of attribute harmonize_log.



5
6
7
# File 'lib/harmonize/strategies/strategy.rb', line 5

def harmonize_log
  @harmonize_log
end

#harmonizerObject

Returns the value of attribute harmonizer.



5
6
7
# File 'lib/harmonize/strategies/strategy.rb', line 5

def harmonizer
  @harmonizer
end

#sourcesObject

Returns the value of attribute sources.



5
6
7
# File 'lib/harmonize/strategies/strategy.rb', line 5

def sources
  @sources
end

#targetsObject

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