Class: Alf::Algebra::Operand::Named
- Inherits:
-
Object
- Object
- Alf::Algebra::Operand::Named
show all
- Includes:
- Alf::Algebra::Operand
- Defined in:
- lib/alf-algebra/alf/algebra/operand/named.rb
Instance Attribute Summary collapse
#connection
Instance Method Summary
collapse
#attr_list, coerce, #to_cog, #to_dot, #to_relation
#bind, #bound?, #connection!
Constructor Details
#initialize(name, connection = nil) ⇒ Named
Returns a new instance of Named.
7
8
9
10
|
# File 'lib/alf-algebra/alf/algebra/operand/named.rb', line 7
def initialize(name, connection = nil)
@name = name
@connection = connection
end
|
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
11
12
13
|
# File 'lib/alf-algebra/alf/algebra/operand/named.rb', line 11
def name
@name
end
|
Instance Method Details
#heading ⇒ Object
17
18
19
|
# File 'lib/alf-algebra/alf/algebra/operand/named.rb', line 17
def heading
connection!.heading(name)
end
|
#keys ⇒ Object
13
14
15
|
# File 'lib/alf-algebra/alf/algebra/operand/named.rb', line 13
def keys
connection!.keys(name)
end
|
#to_lispy ⇒ Object
29
30
31
|
# File 'lib/alf-algebra/alf/algebra/operand/named.rb', line 29
def to_lispy
name.to_s
end
|
#to_relvar ⇒ Object
21
22
23
|
# File 'lib/alf-algebra/alf/algebra/operand/named.rb', line 21
def to_relvar
Relvar::Base.new(name, connection)
end
|
#to_s ⇒ Object
25
26
27
|
# File 'lib/alf-algebra/alf/algebra/operand/named.rb', line 25
def to_s
"Operand::Named(#{name.inspect})"
end
|