module JSONAPI::Formats
Public Class Methods
format(fmt) { || ... }
click to toggle source
Defines a named format with a block
@param [Symbol] fmt the name of the format you wish to create
# File lib/jsonapi-serializer-formats.rb, line 77 def format(fmt) scoped_formats.push(fmt) yield ensure scoped_formats.pop end
formats_per_attr()
click to toggle source
# File lib/jsonapi-serializer-formats.rb, line 12 def formats_per_attr @formats_per_attr ||= {} end
scoped_formats()
click to toggle source
# File lib/jsonapi-serializer-formats.rb, line 8 def scoped_formats @scoped_formats ||= [] end