Class: Reforge::Transformation

Inherits:
Object
  • Object
show all
Extended by:
DSL
Defined in:
lib/reforge/transformation.rb,
lib/reforge/transformation/dsl.rb,
lib/reforge/transformation/tree.rb,
lib/reforge/transformation/transform.rb,
lib/reforge/transformation/transform/memo.rb,
lib/reforge/transformation/transform/factories.rb,
lib/reforge/transformation/tree/aggregate_node.rb,
lib/reforge/transformation/tree/transform_node.rb,
lib/reforge/transformation/tree/aggregate_node/factories.rb,
lib/reforge/transformation/tree/aggregate_node/hash_node.rb,
lib/reforge/transformation/tree/aggregate_node/array_node.rb

Defined Under Namespace

Modules: DSL Classes: Transform, Tree, TreeCreationError

Class Method Summary collapse

Instance Method Summary collapse

Methods included from DSL

create_tree, extract, transform, transform_definitions

Class Method Details

.call(*sources) ⇒ Object



7
8
9
# File 'lib/reforge/transformation.rb', line 7

def self.call(*sources)
  new.call(*sources)
end

Instance Method Details

#call(*sources) ⇒ Object



11
12
13
14
15
# File 'lib/reforge/transformation.rb', line 11

def call(*sources)
  return tree.call(sources[0]) if sources.size == 1

  sources.map { |source| tree.call(source) }
end