Sha256: 241f4ae2bd3a458dd500a015550e6cdaddf974ebe14e8bfc25dcd7ac11d4c8fa

Contents?: true

Size: 573 Bytes

Versions: 12

Compression:

Stored size: 573 Bytes

Contents

class Evil::Client
  #
  # Resolves body of the request from operation schema for given settings.
  #
  # It uses last (nested) definition without any coercion or validation.
  # Formatting and validation is made later by [Evil::Client::Resolver#__call__]
  # because it depends from both :body and :format definitions.
  #
  # @private
  #
  class Resolver::Body < Resolver
    private

    def initialize(schema, settings)
      super(schema, settings, :body)
    end

    def __call__
      super { instance_exec(&__blocks__.last) if __blocks__.any? }
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
evil-client-3.2.0 lib/evil/client/resolver/body.rb
evil-client-3.1.0 lib/evil/client/resolver/body.rb
evil-client-3.0.4 lib/evil/client/resolver/body.rb
evil-client-3.0.3 lib/evil/client/resolver/body.rb
evil-client-3.0.2 lib/evil/client/resolver/body.rb
evil-client-3.0.1 lib/evil/client/resolver/body.rb
evil-client-3.0.0 lib/evil/client/resolver/body.rb
evil-client-2.1.1 lib/evil/client/resolver/body.rb
evil-client-2.1.0 lib/evil/client/resolver/body.rb
evil-client-2.0.0 lib/evil/client/resolver/body.rb
evil-client-1.1.0 lib/evil/client/resolver/body.rb
evil-client-1.0.0 lib/evil/client/resolver/body.rb