Sha256: 73cb5cc7c3bc2ff68add005fe375d4bc7e4e583dc397a7891ef6a26f1b7d4e1d

Contents?: true

Size: 357 Bytes

Versions: 2

Compression:

Stored size: 357 Bytes

Contents

# frozen_string_literal: true

module JsonEnvSettable
  include Sinclair::EnvSettable
  extend Sinclair::Settable::ClassMethods

  class Caster < Sinclair::Settable::Caster
    cast_with(:json) { |value| JSON.parse(value) }
  end
end

class JsonEnvSettings
  extend JsonEnvSettable

  settings_prefix 'JSON'

  setting_with_options :config, type: :json
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sinclair-2.1.1 spec/support/models/json_env_settings.rb
sinclair-2.1.0 spec/support/models/json_env_settings.rb