module Shamu::JsonApi::BuilderMethods::Meta

Public Instance Methods

meta( name, value ) click to toggle source

Add a meta field. @param [String,Symbol] name of the meta field. @param [Object] vlaue that can be converted to a JSON primitive type. @return [self]

# File lib/shamu/json_api/builder_methods/meta.rb, line 9
def meta( name, value )
  meta = ( output[:meta] ||= {} )
  meta[ name.to_sym ] = value

  self
end