Module: ActiveresourceHeaders::CustomHeaders::ClassMethods

Defined in:
lib/activeresource_headers/custom_headers.rb

Instance Method Summary collapse

Instance Method Details

#custom_headers(&block) ⇒ Object

Sets block to execute each time. Block must respond to #call and return #Hash each time.



16
17
18
# File 'lib/activeresource_headers/custom_headers.rb', line 16

def custom_headers(&block)
  @custom_headers = block
end

#with_headers(headers = {}) ⇒ Object

Saves headers #Hash for use in current request.



21
22
23
24
# File 'lib/activeresource_headers/custom_headers.rb', line 21

def with_headers(headers={})
  @with_headers = headers
  self
end