Class: ArrayOrSingleElementEmpty
- Includes:
- Singleton
- Defined in:
- lib/ontomde-core/meta.rb
Overview
Singleton of an empty ArrayOrSingleElement Note:
This object is used for performance enhancement.
Instance Method Summary collapse
-
#+(array) ⇒ Object
returns array.
- #delete(elt) ⇒ Object
-
#each ⇒ Object
Iterator (does nothing).
-
#empty? ⇒ Boolean
return true.
-
#include?(elt) ⇒ Boolean
returns false.
-
#isFalse? ⇒ Boolean
returns !isTrue?.
-
#isTrue? ⇒ Boolean
returns false.
-
#length ⇒ Object
Size of an empty Array (always 0).
-
#select ⇒ Object
returns self as.
-
#size ⇒ Object
Size of an empty Array (always 0).
- #sort(&block) ⇒ Object
-
#to_s ⇒ Object
returns “”.
Instance Method Details
#+(array) ⇒ Object
returns array
76 77 78 |
# File 'lib/ontomde-core/meta.rb', line 76 def +(array) return array end |
#delete(elt) ⇒ Object
105 106 107 |
# File 'lib/ontomde-core/meta.rb', line 105 def delete(elt) return nil end |
#each ⇒ Object
Iterator (does nothing)
65 66 |
# File 'lib/ontomde-core/meta.rb', line 65 def each end |
#empty? ⇒ Boolean
return true
96 97 98 |
# File 'lib/ontomde-core/meta.rb', line 96 def empty? return true end |
#include?(elt) ⇒ Boolean
returns false
101 102 103 |
# File 'lib/ontomde-core/meta.rb', line 101 def include?(elt) return false end |
#isFalse? ⇒ Boolean
returns !isTrue?
81 82 83 |
# File 'lib/ontomde-core/meta.rb', line 81 def isFalse? return !isTrue? end |
#isTrue? ⇒ Boolean
returns false
86 87 88 |
# File 'lib/ontomde-core/meta.rb', line 86 def isTrue? return false end |
#length ⇒ Object
Size of an empty Array (always 0)
60 61 62 |
# File 'lib/ontomde-core/meta.rb', line 60 def length 0 end |
#select ⇒ Object
returns self as
69 70 71 72 73 |
# File 'lib/ontomde-core/meta.rb', line 69 def select # quelque-soit le critere # de selection le retour est tout aussi vide return self; end |
#size ⇒ Object
Size of an empty Array (always 0)
55 56 57 |
# File 'lib/ontomde-core/meta.rb', line 55 def size 0 end |
#sort(&block) ⇒ Object
109 110 111 |
# File 'lib/ontomde-core/meta.rb', line 109 def sort(&block) return self end |
#to_s ⇒ Object
returns “”
91 92 93 |
# File 'lib/ontomde-core/meta.rb', line 91 def to_s return '' end |