Class: FunctionalLightService::Option::Some

Inherits:
Object
  • Object
show all
Defined in:
lib/functional-light-service/functional/option.rb

Instance Method Summary collapse

Constructor Details

#initialize(init) ⇒ Some

Returns a new instance of Some.

Raises:

  • (ArgumentError)


11
12
13
14
15
# File 'lib/functional-light-service/functional/option.rb', line 11

def initialize(init)
  raise ArgumentError, "Some cannot wrap nil: use None instead" if init.nil?

  super
end