module Strelka::HTTPRequest::Metadata
The mixin that adds methods to Strelka::HTTPRequest
for Thingfish
metadata.
request.metadata request.add_metadata
Attributes
metadata[R]
The Hash of Thingfish
metadata associated with the request
Public Class Methods
new( * )
click to toggle source
Set up some data structures for metadata.
Calls superclass method
# File lib/strelka/httprequest/metadata.rb, line 22 def initialize( * ) super @metadata = {} @related_resources = {} end
Public Instance Methods
add_metadata( metadata )
click to toggle source
Merge the metadata in the given metadata
hash into the request's current metadata.
# File lib/strelka/httprequest/metadata.rb, line 43 def add_metadata( metadata ) self.log.debug "Adding metadata to the request: %p" % [ metadata ] metadata = normalize_keys( metadata ) self.metadata.merge!( metadata ) end