Class: RFunk::None
- Inherits:
-
Option
show all
- Includes:
- Singleton
- Defined in:
- lib/rfunk/maybe/none.rb
Instance Method Summary
collapse
Methods inherited from Option
#each
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(_method, *_arguments, &_block) ⇒ Object
17
18
19
|
# File 'lib/rfunk/maybe/none.rb', line 17
def method_missing(_method, *_arguments, &_block)
self
end
|
Instance Method Details
#coerce(other) ⇒ Object
25
26
27
|
# File 'lib/rfunk/maybe/none.rb', line 25
def coerce(other)
[other, 0]
end
|
#or(other) ⇒ Object
9
10
11
|
# File 'lib/rfunk/maybe/none.rb', line 9
def or(other)
RFunk::Option(other)
end
|
#pipe(&_block) ⇒ Object
13
14
15
|
# File 'lib/rfunk/maybe/none.rb', line 13
def pipe(&_block)
self
end
|
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
21
22
23
|
# File 'lib/rfunk/maybe/none.rb', line 21
def respond_to_missing?(method_name, include_private = false)
super
end
|
#to_ary ⇒ Object
33
34
35
|
# File 'lib/rfunk/maybe/none.rb', line 33
def to_ary
[]
end
|
#to_hash ⇒ Object
37
38
39
|
# File 'lib/rfunk/maybe/none.rb', line 37
def to_hash
{}
end
|
#to_str ⇒ Object
29
30
31
|
# File 'lib/rfunk/maybe/none.rb', line 29
def to_str
''
end
|
#value(default = None()) ⇒ Object
5
6
7
|
# File 'lib/rfunk/maybe/none.rb', line 5
def value(default = None())
RFunk::Option(default)
end
|