Module: Alf::Engine::Cog
- Includes:
- Compiler::Cog, Enumerable
- Included in:
- Aggregate, Autonum, Cesure, Clip, Coerce, Compact, Alf::Engine::Compact::Set, Alf::Engine::Compact::Uniq, Concat, Defaults, Filter, Generator, Group::Hash, Hierarchize, InferHeading, Join::Hash, Leaf, Materialize::Array, Materialize::Hash, Rename, Semi::Hash, SetAttr, Sort::InMemory, Summarize::Hash, Take, ToArray, TypeSafe, Ungroup, Unwrap, Wrap
- Defined in:
- lib/alf/engine/cog.rb
Constant Summary
collapse
- EMPTY_CHILDREN =
[].freeze
- EMPTY_OPTIONS =
{}.freeze
Instance Attribute Summary
#compiler, #expr
Instance Method Summary
collapse
#cog_orders, #initialize, #orderedby?, #relation_type, #to_ascii_tree, #to_cog, #to_relation
Instance Method Details
#arguments ⇒ Object
37
38
39
|
# File 'lib/alf/engine/cog.rb', line 37
def arguments
EMPTY_CHILDREN
end
|
#children ⇒ Object
16
17
18
19
20
|
# File 'lib/alf/engine/cog.rb', line 16
def children
return operands if respond_to?(:operands)
return [operand] if respond_to?(:operand)
EMPTY_CHILDREN
end
|
#each(&bl) ⇒ Object
11
12
13
14
|
# File 'lib/alf/engine/cog.rb', line 11
def each(&bl)
return to_enum unless block_given?
_each(&bl)
end
|
#options ⇒ Object
41
42
43
|
# File 'lib/alf/engine/cog.rb', line 41
def options
EMPTY_OPTIONS
end
|
#to_s ⇒ Object
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/alf/engine/cog.rb', line 22
def to_s
label = ""
label << self.class.name.to_s[/Engine::(.*?)$/, 1].to_s
label << " ..."
unless (args = arguments).empty?
label << ", "
label << args.map{|arg| Support.to_lispy(arg, "[unsupported]") }.join(', ')
end
unless (opts = options).empty?
label << ", "
label << Support.to_lispy(options, "[unsupported]")
end
label
end
|