Sha256: 0cd98e5f016171b0af4d29d8c8ebeb764efe592aa3133f513e4724285b80e597

Contents?: true

Size: 371 Bytes

Versions: 1

Compression:

Stored size: 371 Bytes

Contents

module Apitizer
  class Result < SimpleDelegator
    extend Forwardable

    def_delegator :@request, :path
    def_delegator :@response, :code
    def_delegators :__getobj__, :is_a?, :kind_of?, :instance_of?

    def initialize(options)
      @request = options.fetch(:request)
      @response = options.fetch(:response)
      super(@response.content)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
apitizer-0.0.3 lib/apitizer/result.rb