lib/daylight/api.rb
##
# Extract meta attribute from attributes and save it
Extract meta attribute from attributes and save it
Extract meta attribute from attributes and save it
def extract_metadata!(attributes)
      if Hash === attributes && attributes.has_key?('meta')
        metadata = (attributes.delete('meta')||{}).with_indifferent_access
        metadata.merge!(metadata.delete(self.class.element_name) || {})
      end
      @metadata = metadata || {}
    end
def extract_metadata! ( attributes ) if Hash === attributes && attributes . has_key? ( 'meta' ) metadata = ( attributes . delete ( 'meta' ) || { } ) . with_indifferent_access metadata . merge! ( metadata . delete ( self . class . element_name ) || { } ) end @metadata = metadata || { } end
Extract meta attribute from attributes and save it
Extract meta attribute from attributes and save it
# save and strip any metadata supplied in the response
attributes
<not_specific>