Class: Alf::Algebra::Operand::Proxy

Inherits:
Object
  • Object
show all
Includes:
Alf::Algebra::Operand
Defined in:
lib/alf-algebra/alf/algebra/operand/proxy.rb

Instance Attribute Summary collapse

Attributes included from Support::Bindable

#connection

Instance Method Summary collapse

Methods included from Alf::Algebra::Operand

#attr_list, coerce, #heading, #keys, #to_dot, #to_relation

Methods included from Support::Bindable

#bind, #bound?, #connection!

Constructor Details

#initialize(subject) ⇒ Proxy

Returns a new instance of Proxy.



7
8
9
# File 'lib/alf-algebra/alf/algebra/operand/proxy.rb', line 7

def initialize(subject)
  @subject = subject
end

Instance Attribute Details

#subjectObject (readonly)

Returns the value of attribute subject.



10
11
12
# File 'lib/alf-algebra/alf/algebra/operand/proxy.rb', line 10

def subject
  @subject
end

Instance Method Details

#to_cogObject



12
13
14
15
# File 'lib/alf-algebra/alf/algebra/operand/proxy.rb', line 12

def to_cog
  return subject.to_cog if subject.respond_to?(:to_cog)
  Alf::Engine::Leaf.new(subject)
end

#to_relvarObject



17
18
19
20
# File 'lib/alf-algebra/alf/algebra/operand/proxy.rb', line 17

def to_relvar
  return subject.to_relvar if subject.respond_to?(:to_relvar)
  super
end