class method self.new

Ruby on Rails 7.1.6

Since v5.2.8.1

Available in: v5.2.8.1 v6.0.6 v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

self.new(precision: nil, limit: nil, scale: nil)

Initializes a type with three basic configuration settings: precision, limit, and scale. The Value base class does not define behavior for these settings. It uses them for equality comparison and hash key generation only.

Parameters

precision key = nil
limit key = nil
scale key = nil
Source
# File activemodel/lib/active_model/type/value.rb, line 17
      def initialize(precision: nil, limit: nil, scale: nil)
        super()
        @precision = precision
        @scale = scale
        @limit = limit
      end

Defined in activemodel/lib/active_model/type/value.rb line 17 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveModel::Type::Value

Type at least 2 characters to search.

↑↓ navigate · open · esc close