Class: Alf::Algebra::Operand::Proxy
Instance Attribute Summary collapse
Instance Method Summary
collapse
#attr_list, coerce, #resulting_type, #to_ascii_tree, #to_relation, #type_check
Constructor Details
#initialize(subject) ⇒ Proxy
Returns a new instance of Proxy.
7
8
9
|
# File 'lib/alf/algebra/operand/proxy.rb', line 7
def initialize(subject)
@subject = subject
end
|
Instance Attribute Details
#subject ⇒ Object
Returns the value of attribute subject.
10
11
12
|
# File 'lib/alf/algebra/operand/proxy.rb', line 10
def subject
@subject
end
|
Instance Method Details
#heading ⇒ Object
12
13
14
15
|
# File 'lib/alf/algebra/operand/proxy.rb', line 12
def heading
return subject.heading if subject.respond_to?(:heading)
super
end
|
#inspect ⇒ Object
36
37
38
|
# File 'lib/alf/algebra/operand/proxy.rb', line 36
def inspect
"Operand::Proxy(#{subject})"
end
|
#keys ⇒ Object
17
18
19
20
|
# File 'lib/alf/algebra/operand/proxy.rb', line 17
def keys
return subject.keys if subject.respond_to?(:keys)
super
end
|
#to_cog(*args, &bl) ⇒ Object
22
23
24
25
|
# File 'lib/alf/algebra/operand/proxy.rb', line 22
def to_cog(*args, &bl)
return subject.to_cog(*args, &bl) if subject.respond_to?(:to_cog)
Alf::Engine::Leaf.new(subject)
end
|
#to_relvar ⇒ Object
27
28
29
30
|
# File 'lib/alf/algebra/operand/proxy.rb', line 27
def to_relvar
return subject.to_relvar if subject.respond_to?(:to_relvar)
Relvar::ReadOnly.new(self)
end
|
#to_s ⇒ Object
32
33
34
|
# File 'lib/alf/algebra/operand/proxy.rb', line 32
def to_s
subject.to_s
end
|