Class: RspecApiDocs::Resource::Example::RequestHeaders

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec_api_docs/formatter/resource/example/request_headers.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(env) ⇒ RequestHeaders


11
12
13
# File 'lib/rspec_api_docs/formatter/resource/example/request_headers.rb', line 11

def initialize(env)
  @env = env
end

Instance Attribute Details

#envObject (readonly)

Returns the value of attribute env


5
6
7
# File 'lib/rspec_api_docs/formatter/resource/example/request_headers.rb', line 5

def env
  @env
end

Class Method Details

.call(*args) ⇒ Object


7
8
9
# File 'lib/rspec_api_docs/formatter/resource/example/request_headers.rb', line 7

def self.call(*args)
  new(*args).call
end

Instance Method Details

#callObject


15
16
17
18
19
# File 'lib/rspec_api_docs/formatter/resource/example/request_headers.rb', line 15

def call
  headers.reject do |k, v|
    excluded_headers.include?(k)
  end
end