Sha256: d9e77db805ac085a7933e4e6603a7cbd4c047de48b296a8707e68bc498e931b8

Contents?: true

Size: 431 Bytes

Versions: 14

Compression:

Stored size: 431 Bytes

Contents

module Shamu
  module JsonApi
    module BuilderMethods
      module Meta
        # 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]
        def meta( name, value )
          meta = ( output[:meta] ||= {} )
          meta[ name.to_sym ] = value

          self
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
shamu-0.0.24 lib/shamu/json_api/builder_methods/meta.rb
shamu-0.0.21 lib/shamu/json_api/builder_methods/meta.rb
shamu-0.0.20 lib/shamu/json_api/builder_methods/meta.rb
shamu-0.0.19 lib/shamu/json_api/builder_methods/meta.rb
shamu-0.0.18 lib/shamu/json_api/builder_methods/meta.rb
shamu-0.0.17 lib/shamu/json_api/builder_methods/meta.rb
shamu-0.0.15 lib/shamu/json_api/builder_methods/meta.rb
shamu-0.0.14 lib/shamu/json_api/builder_methods/meta.rb
shamu-0.0.13 lib/shamu/json_api/builder_methods/meta.rb
shamu-0.0.11 lib/shamu/json_api/builder_methods/meta.rb
shamu-0.0.9 lib/shamu/json_api/builder_methods/meta.rb
shamu-0.0.8 lib/shamu/json_api/builder_methods/meta.rb
shamu-0.0.7 lib/shamu/json_api/builder_methods/meta.rb
shamu-0.0.5 lib/shamu/json_api/builder_methods/meta.rb