Module: Bmg::Operator

Includes:
Relation
Included in:
Binary, Nary, Unary
Defined in:
lib/bmg/operator.rb,
lib/bmg/operator/page.rb,
lib/bmg/operator/group.rb,
lib/bmg/operator/image.rb,
lib/bmg/operator/union.rb,
lib/bmg/operator/allbut.rb,
lib/bmg/operator/extend.rb,
lib/bmg/operator/rename.rb,
lib/bmg/operator/project.rb,
lib/bmg/operator/rxmatch.rb,
lib/bmg/operator/autowrap.rb,
lib/bmg/operator/matching.rb,
lib/bmg/operator/restrict.rb,
lib/bmg/operator/constants.rb,
lib/bmg/operator/autosummarize.rb

Defined Under Namespace

Modules: Binary, Nary, Unary Classes: Allbut, Autosummarize, Autowrap, Constants, Extend, Group, Image, Matching, Page, Project, Rename, Restrict, Rxmatch, Union

Constant Summary

Constants included from Algebra

Algebra::METHODS

Instance Method Summary collapse

Methods included from Relation

#debug, #delete, empty, #empty?, #insert, new, #one, #one_or_nil, #to_ast, #to_json, #update, #visit, #ys_by_x

Methods included from Algebra

#allbut, #autosummarize, #autowrap, #constants, #extend, #group, #image, #matching, #page, #project, #rename, #restrict, #rxmatch, #spied, #union, #unspied

Instance Method Details

#inspectObject



14
15
16
17
18
19
20
21
# File 'lib/bmg/operator.rb', line 14

def inspect
  str = "(#{self.class.name.split('::').last.downcase}\n"
  str << operands.map{|op| op.inspect.gsub(/^/m, "  ") }.join("\n")
  str << "\n"
  str << args.map{|a| a.inspect.gsub(/^/m, "  ") }.join("\n")
  str << ")"
  str
end

#to_sObject



5
6
7
8
9
10
11
12
# File 'lib/bmg/operator.rb', line 5

def to_s
  str = "(#{self.class.name.split('::').last.downcase}\n"
  str << operands.map{|op| op.to_s.gsub(/^/m, "  ") }.join("\n")
  str << "\n"
  str << args.map{|a| a.to_s.gsub(/^/m, "  ") }.join("\n")
  str << ")"
  str
end