Sha256: 7518658205f9301b767fcedffb30822c759c29bfc24580ed2f3508c99eaaa4e4

Contents?: true

Size: 528 Bytes

Versions: 8

Compression:

Stored size: 528 Bytes

Contents

# frozen_string_literal: true

class ModelPercent < ActiveRecord::Base
  normalizy :text                    , with: :percent
  normalizy :cents_type              , with: { percent: { type: :cents } }
  normalizy :cast_to_i               , with: { percent: { cast: :to_i } }
  normalizy :cast_to_d               , with: { percent: { cast: :to_d } }
  normalizy :cents_type_and_cast_to_f, with: { percent: { cast: :to_f, type: :cents } }
  normalizy :cents_type_and_cast_to_i, with: { percent: { cast: :to_i, type: :cents } }
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
normalizy-1.5.0 spec/support/models/model_percent.rb
normalizy-1.4.0 spec/support/models/model_percent.rb
normalizy-1.3.0 spec/support/models/model_percent.rb
normalizy-1.2.0 spec/support/models/model_percent.rb
normalizy-1.1.1 spec/support/models/model_percent.rb
normalizy-1.1.0 spec/support/models/model_percent.rb
normalizy-1.0.1 spec/support/models/model_percent.rb
normalizy-1.0.0 spec/support/models/model_percent.rb