Strelka::HTTPRequest::

Metadata

module
Included Modules
Strelka::Constants
Thingfish::Normalization

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

The Hash of related resources

Public Class Methods

anchor
new( * )

Set up some data structures for metadata.

# File lib/strelka/httprequest/metadata.rb, line 22
def initialize( * )
        super

        @metadata = {}
        @related_resources = {}
end

Public Instance Methods

anchor
add_metadata( metadata )

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
anchor anchor