class method
self.new
Ruby on Rails 8.0.4
Since v5.2.8.1Signature
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
-
precisionkey = nil -
limitkey = nil -
scalekey = 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