Module: VectorSpace::Family::InstanceMethods

Defined in:
lib/vector_space/family.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



29
30
31
32
33
# File 'lib/vector_space/family.rb', line 29

def self.included(base)
  base.class_eval do
    def_delegator :'self.class', :index
  end
end

Instance Method Details

#compatible_with?(other) ⇒ Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/vector_space/family.rb', line 35

def compatible_with?(other)
  super && project(index) == other.project(index)
end