Class: Kind::Monad::Wrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/kind/monad.rb

Instance Method Summary collapse

Constructor Details

#initialize(monad) ⇒ Wrapper

Returns a new instance of Wrapper.



8
9
10
11
# File 'lib/kind/monad.rb', line 8

def initialize(monad)
  @monad = monad
  @output = UNDEFINED
end

Instance Method Details

#output ⇒ Object



17
18
19
# File 'lib/kind/monad.rb', line 17

def output
  @output if output?
end

#output? ⇒ Boolean

Returns:



13
14
15
# File 'lib/kind/monad.rb', line 13

def output?
  UNDEFINED != @output
end