Module: Restio::Util::Header

Included in:
Config, Connector::Generic
Defined in:
lib/restio/util/header.rb

Instance Method Summary collapse

Instance Method Details

#add_header(name, value) ⇒ Object



4
5
6
7
# File 'lib/restio/util/header.rb', line 4

def add_header name, value
  @headers ||= {}
  @headers[name] = value
end

#headersObject



8
9
10
11
12
# File 'lib/restio/util/header.rb', line 8

def headers
  @headers ||= {}
  return @headers if self.class.name == 'Restio::Config'
  @headers.merge(Restio.config.headers)
end