Class: KeySet::None
Constant Summary
Constants inherited
from KeySet
VERSION
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from KeySet
#<=>, #==, #===, all, all_except_some, default_logger, #eql?, #hash, logger, none, #represents_all?, some
Class Method Details
.class_sort_index ⇒ Object
5
6
7
|
# File 'lib/key_set/none.rb', line 5
def self.class_sort_index
0
end
|
Instance Method Details
#intersect(other) ⇒ Object
#invert ⇒ Object
13
14
15
|
# File 'lib/key_set/none.rb', line 13
def invert
KeySet.all
end
|
#remove(other) ⇒ Object
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/key_set/none.rb', line 17
def remove(other)
case other
when All
KeySet.none
when None
KeySet.none
when Some
KeySet.none
when AllExceptSome
KeySet.logger.warn "KeySet removing AllButSome, probably a mistake. this: NONE, removing keys: #{other.keys.inspect}"
KeySet.none
else
raise ArgumentError, 'it needs a valid KeySet'
end
end
|
#represents_none? ⇒ Boolean
9
10
11
|
# File 'lib/key_set/none.rb', line 9
def represents_none?
true
end
|