class Axiom::Relation::Base

A class that represents a base relation

Attributes

name[R]

The base relation name

@example

name = base.name

@return [Symbol]

@api public

Public Class Methods

new(name, header, tuples = Empty::ZERO_TUPLE) click to toggle source

Initialize a base relation

@param [#to_sym] name

the relation name

@param [Header, to_ary] header

the relation header

@param [Enumerable] tuples

the relation tuples

@return [undefined]

@api private

Calls superclass method Axiom::Relation::new
# File lib/axiom/relation/base.rb, line 32
def initialize(name, header, tuples = Empty::ZERO_TUPLE)
  super(header, tuples)
  @name = name.to_sym
end

Public Instance Methods

==(other) click to toggle source

Compare the base relation with other relation for equivalency

@example

base == other  # => true or false

@param [Relation] other

the other relation to compare with

@return [Boolean]

@api public

Calls superclass method Axiom::Relation#==
# File lib/axiom/relation/base.rb, line 48
def ==(other)
  super && (!other.respond_to?(:name) || name == other.name)
end