Sha256: 428b13fab2bb86b21e361ec9abe50f55669439c455a85423dbfbb0587b62b088

Contents?: true

Size: 431 Bytes

Versions: 11

Compression:

Stored size: 431 Bytes

Contents

module RubyFS
  class Response
    attr_reader :headers, :content

    extend Forwardable
    def_delegator :content, :[]
    def_delegator :content, :has_key?

    def initialize(headers = nil, content = nil)
      @headers, @content = headers || {}, content || {}
    end

    def ==(other)
      other.is_a?(self.class) && [:headers, :content].all? do |att|
        other.send(att) == self.send(att)
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ruby_fs-1.1.0 lib/ruby_fs/response.rb
ruby_fs-1.0.5 lib/ruby_fs/response.rb
ruby_fs-1.0.4 lib/ruby_fs/response.rb
ruby_fs-1.0.3 lib/ruby_fs/response.rb
ruby_fs-1.0.2 lib/ruby_fs/response.rb
ruby_fs-1.0.1 lib/ruby_fs/response.rb
ruby_fs-1.0.0 lib/ruby_fs/response.rb
ruby_fs-0.3.1 lib/ruby_fs/response.rb
ruby_fs-0.3.0 lib/ruby_fs/response.rb
ruby_fs-0.2.0 lib/ruby_fs/response.rb
ruby_fs-0.1.0 lib/ruby_fs/response.rb