Module: Axiom::Relation::Operation::Wrap::Methods

Defined in:
lib/axiom/relation/operation/wrap.rb

Instance Method Summary collapse

Instance Method Details

#wrap(wrapping) ⇒ Wrap

Return a wrapped relation

Examples:

wrapped = relation.wrap(location: [:latitude, :longitude])

Parameters:

  • Hash{#to_sym (Hash{#to_sym => Enumerable<Axiom::Attribute>] wrapping)

    > Enumerable<Axiom::Attribute>] wrapping

Returns:



72
73
74
75
76
# File 'lib/axiom/relation/operation/wrap.rb', line 72

def wrap(wrapping)
  wrapping.reduce(self) do |operation, pair|
    Wrap.new(operation, *pair)
  end
end