Class: Nothing

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/just_maybe/nothing.rb

Instance Method Summary collapse

Instance Method Details

#nothing?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/just_maybe/nothing.rb', line 6

def nothing?
  true
end

#something?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/just_maybe/nothing.rb', line 10

def something?
  false
end

#to_sObject



17
18
19
# File 'lib/just_maybe/nothing.rb', line 17

def to_s
  "Nothing"
end

#tryObject



14
15
# File 'lib/just_maybe/nothing.rb', line 14

def try
end