Method: Funkr::Types::Failable#map

Defined in:
lib/funkr/types/failable.rb

#map(&block) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/funkr/types/failable.rb', line 19

def map(&block)
  case self.const
  when :ok then
    self.class.ok(yield(*self.data))
  else self
  end
end