Class: Optiomist::None

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

Overview

There is no value.

Example:

>> result = Optiomist.none
>> result.none?
=> true

Instance Method Summary collapse

Instance Method Details

#nil?Boolean

Should it really respond to nil?

Returns:

  • (Boolean)


45
46
47
# File 'lib/optiomist.rb', line 45

def nil?
  true
end

#none?Boolean

It’s true.

Returns:

  • (Boolean)


55
56
57
# File 'lib/optiomist.rb', line 55

def none?
  true
end

#some?Boolean

It’s false.

Returns:

  • (Boolean)


50
51
52
# File 'lib/optiomist.rb', line 50

def some?
  false
end