Module: Mayak::Decoder

Extended by:
T::Generic, T::Helpers, T::Sig
Included in:
Implementation, Http::Decoder
Defined in:
lib/mayak/decoder.rb

Defined Under Namespace

Classes: Implementation

Constant Summary collapse

In =
type_member(:in)
Out =
type_member(:out)

Instance Method Summary collapse

Instance Method Details

#decode(response) ⇒ Object



20
21
# File 'lib/mayak/decoder.rb', line 20

def decode(response)
end

#map(&blk) ⇒ Object



28
29
30
31
32
# File 'lib/mayak/decoder.rb', line 28

def map(&blk)
  ::Mayak::Decoder::Implementation[In, T.type_parameter(:In2)].new do |entity|
    decode(entity).map { |result| blk.call(result) }
  end
end