Module: Yaoc::Strategies::ToArrayMapping

Defined in:
lib/yaoc/strategies/to_array_mapping.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(other) ⇒ Object



4
5
6
# File 'lib/yaoc/strategies/to_array_mapping.rb', line 4

def self.included(other)
  other.extend(ClassMethods)
end

Instance Method Details

#callObject



8
9
10
11
12
13
14
# File 'lib/yaoc/strategies/to_array_mapping.rb', line 8

def call
  [].tap do |result|
    converter_methods.each do |method_name|
      self.public_send(method_name, to_convert, result)
    end
  end
end