Class: Maybe::Nothing
- Inherits:
-
Object
show all
- Includes:
- Singleton
- Defined in:
- lib/maybe/nothing.rb
Defined Under Namespace
Classes: NothingToSeeHere
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing ⇒ Object
29
30
31
|
# File 'lib/maybe/nothing.rb', line 29
def method_missing(*)
self
end
|
Instance Method Details
#else(&blk) ⇒ Object
13
14
15
|
# File 'lib/maybe/nothing.rb', line 13
def else(&blk)
blk.()
end
|
#get ⇒ Object
17
18
19
|
# File 'lib/maybe/nothing.rb', line 17
def get
raise NothingToSeeHere
end
|
#nothing? ⇒ Boolean
21
22
23
|
# File 'lib/maybe/nothing.rb', line 21
def nothing?
true
end
|
#something? ⇒ Boolean
25
26
27
|
# File 'lib/maybe/nothing.rb', line 25
def something?
false
end
|