Class: Bmg::Type
- Inherits:
-
Object
- Object
- Bmg::Type
- Defined in:
- lib/bmg/type.rb
Constant Summary collapse
- ANY =
Type.new
Instance Attribute Summary collapse
-
#predicate ⇒ Object
readonly
Returns the value of attribute predicate.
Instance Method Summary collapse
- #[](attribute) ⇒ Object
- #allbut(butlist) ⇒ Object
- #autosummarize(by, summarization) ⇒ Object
- #autowrap(options) ⇒ Object
- #constants(cs) ⇒ Object
- #extend(extension) ⇒ Object
- #image(right, as, on, options) ⇒ Object
-
#initialize(predicate = Predicate.tautology) ⇒ Type
constructor
A new instance of Type.
- #matching(right, on) ⇒ Object
- #project(attrlist) ⇒ Object
- #rename(renaming) ⇒ Object
- #restrict(predicate) ⇒ Object
- #union(other) ⇒ Object
Constructor Details
#initialize(predicate = Predicate.tautology) ⇒ Type
Returns a new instance of Type.
4 5 6 7 |
# File 'lib/bmg/type.rb', line 4 def initialize(predicate = Predicate.tautology) @predicate = predicate raise ArgumentError if @predicate.nil? end |
Instance Attribute Details
#predicate ⇒ Object (readonly)
Returns the value of attribute predicate.
8 9 10 |
# File 'lib/bmg/type.rb', line 8 def predicate @predicate end |
Instance Method Details
#[](attribute) ⇒ Object
12 13 14 |
# File 'lib/bmg/type.rb', line 12 def [](attribute) ANY end |
#allbut(butlist) ⇒ Object
16 17 18 |
# File 'lib/bmg/type.rb', line 16 def allbut(butlist) ANY end |
#autosummarize(by, summarization) ⇒ Object
24 25 26 |
# File 'lib/bmg/type.rb', line 24 def autosummarize(by, summarization) ANY end |
#autowrap(options) ⇒ Object
20 21 22 |
# File 'lib/bmg/type.rb', line 20 def autowrap() ANY end |
#constants(cs) ⇒ Object
28 29 30 |
# File 'lib/bmg/type.rb', line 28 def constants(cs) Type.new(@predicate & Predicate.eq(cs)) end |
#extend(extension) ⇒ Object
32 33 34 |
# File 'lib/bmg/type.rb', line 32 def extend(extension) ANY end |
#image(right, as, on, options) ⇒ Object
36 37 38 |
# File 'lib/bmg/type.rb', line 36 def image(right, as, on, ) ANY end |
#matching(right, on) ⇒ Object
40 41 42 |
# File 'lib/bmg/type.rb', line 40 def matching(right, on) ANY end |
#project(attrlist) ⇒ Object
44 45 46 |
# File 'lib/bmg/type.rb', line 44 def project(attrlist) ANY end |
#rename(renaming) ⇒ Object
48 49 50 |
# File 'lib/bmg/type.rb', line 48 def rename(renaming) Type.new(@predicate.rename(renaming)) end |