Class: ROM::Configurable::Constructors::Inherit

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



139
140
141
142
143
144
145
146
147
148
149
# File 'lib/rom/support/configurable.rb', line 139

def call(*args)
  super { |left, right|
    case left
    when nil then right
    when Hash then right.merge(left)
    when Array then (right.map(&:dup) + left.map(&:dup)).uniq
    else
      left
    end
  }
end