Class: Alf::Algebra::Operand::Proxy
- Inherits:
-
Object
- Object
- Alf::Algebra::Operand::Proxy
- Includes:
- Alf::Algebra::Operand
- Defined in:
- lib/alf-algebra/alf/algebra/operand/proxy.rb
Instance Attribute Summary collapse
-
#subject ⇒ Object
readonly
Returns the value of attribute subject.
Attributes included from Support::Bindable
Instance Method Summary collapse
-
#initialize(subject) ⇒ Proxy
constructor
A new instance of Proxy.
- #to_cog ⇒ Object
- #to_relvar ⇒ Object
Methods included from Alf::Algebra::Operand
#attr_list, coerce, #heading, #keys, #to_dot, #to_relation
Methods included from Support::Bindable
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
#subject ⇒ Object (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_cog ⇒ Object
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_relvar ⇒ Object
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 |