module Axiom::Relation::Operation::Set::ClassMethods

Public Instance Methods

new(*args) click to toggle source

Instantiate a new Set relation

@example

set = SetRelation.new(left, right)

@param [Array(Relation, Relation)] args

@return [Set]

@api public

Calls superclass method
# File lib/axiom/relation/operation/set.rb, line 51
def new(*args)
  assert_equivalent_headers(*args)
  super
end

Private Instance Methods

assert_equivalent_headers(left, right) click to toggle source

Assert that left and right have equivalent headers

@param [Relation] left @param [Relation] right

@return [undefined]

@raise [InvalidHeaderError]

raised if the headers are not equivalent

@api private

# File lib/axiom/relation/operation/set.rb, line 69
def assert_equivalent_headers(left, right)
  if left.header != right.header
    fail InvalidHeaderError, 'the headers must be equivalent'
  end
end