Class: ROM::Configurable::Constructors::Join

Inherits:
Default
  • Object
show all
Defined in:
lib/rom/support/configurable.rb

Instance Attribute Summary

Attributes inherited from Default

#name

Instance Method Summary collapse

Instance Method Details

#call(*args) ⇒ Object



153
154
155
156
157
158
159
160
161
162
# File 'lib/rom/support/configurable.rb', line 153

def call(*args)
  super { |left, right, direction|
    case direction
    when :left then [right, left]
    when :right then [left, right]
    else
      raise ArgumentError, "+#{direction}+ direction is not supported"
    end.compact.join(".")
  }
end