The mixin that adds methods to Strelka::HTTPRequest for Thingfish metadata.
request.metadata request.add_metadata
The Hash of Thingfish metadata associated with the request
The Hash of related resources
Set up some data structures for metadata.
# File lib/strelka/httprequest/metadata.rb, line 22
def initialize( * )
super
@metadata = {}
@related_resources = {}
end
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