Class: Alf::Algebra::Rank
- Inherits:
-
Object
- Object
- Alf::Algebra::Rank
- Includes:
- Operator, Relational, Unary
- Defined in:
- lib/alf-algebra/alf/algebra/operator/rank.rb
Instance Attribute Summary
Attributes included from Operator
Attributes included from Support::Bindable
Instance Method Summary collapse
Methods included from Operator
#==, #bind, #dup, included, #initialize, #signature, #to_lispy, #to_relvar, #with_operands
Methods included from Support::Registry
#each, #listen, #listeners, #register, #registered
Methods included from Operand
#attr_list, coerce, #to_cog, #to_dot, #to_relation
Methods included from Support::Bindable
Methods included from Relational
Methods included from Unary
included, #operand, #with_operand
Instance Method Details
#heading ⇒ Object
11 12 13 |
# File 'lib/alf-algebra/alf/algebra/operator/rank.rb', line 11 def heading @heading ||= operand.heading.merge(as => Integer) end |
#keys ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/alf-algebra/alf/algebra/operator/rank.rb', line 15 def keys @keys ||= begin keys, order_attrs = operand.keys, order.to_attr_list if keys.any?{|k| order_attrs.superset?(k)} keys + [ AttrList[as] ] else keys end end end |