Sha256: 37ba4cbc71fcf485b19b97764d4c333e3dbd2e3ef521d13c9fcded661974fb28
Contents?: true
Size: 554 Bytes
Versions: 8
Compression:
Stored size: 554 Bytes
Contents
require 'jsonapi/formatter' module JSONAPI class Configuration attr_reader :json_key_format, :key_formatter def initialize #:underscored_key, :camelized_key, :dasherized_key, or custom self.json_key_format = :underscored_key end def json_key_format=(format) @json_key_format = format @key_formatter = JSONAPI::Formatter.formatter_for(format) end end class << self attr_accessor :configuration end @configuration ||= Configuration.new def self.configure yield(@configuration) end end
Version data entries
8 entries across 8 versions & 1 rubygems