Sha256: 216d3d46dcf24bf611e83a7f03807cd30d14d9467f6c45ca722fbd45af178c09
Contents?: true
Size: 282 Bytes
Versions: 2
Compression:
Stored size: 282 Bytes
Contents
# frozen_string_literal: true class Sinclair module Settable class Caster cast_with(:squared) { |value| value.to_f**2 } end end end class MathEnvSettings extend Sinclair::EnvSettable settings_prefix 'MATH' setting_with_options :value, type: :squared end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
sinclair-2.1.1 | spec/support/models/math_env_settings.rb |
sinclair-2.1.0 | spec/support/models/math_env_settings.rb |