Class: Fear::None

Inherits:
Object
  • Object
show all
Includes:
Option
Defined in:
lib/fear/none.rb

Instance Method Summary collapse

Methods included from Option

#any?, #each, #flat_map, #get_or_else, #include?, #map, #to_a

Instance Method Details

#empty?true

Returns:

  • (true)


18
19
20
# File 'lib/fear/none.rb', line 18

def empty?
  true
end

#getObject

Raises:



8
9
10
# File 'lib/fear/none.rb', line 8

def get
  fail NoSuchElementError
end

#or_nilnil

Returns:

  • (nil)


13
14
15
# File 'lib/fear/none.rb', line 13

def or_nil
  nil
end

#rejectNone

Returns:



28
29
30
# File 'lib/fear/none.rb', line 28

def reject(*)
  self
end

#selectNone

Returns:



23
24
25
# File 'lib/fear/none.rb', line 23

def select(*)
  self
end