Class: Sanitized::BigInteger
- Inherits:
-
ActiveModel::Type::BigInteger
- Object
- ActiveModel::Type::BigInteger
- Sanitized::BigInteger
- Includes:
- Base
- Defined in:
- lib/sanitized/big_integer.rb
Overview
Description
ActiveModel::Type to cast and sanitize a model’s BigInt attribute according to the options specified on initialisation.
attribute :attr_name, Sanitized::BigInt.new(:abs), default: 123
Can optionally include a custom block:
type_cast = Sanitized::BigInt.new(:abs) do |value|
... custome code ...
end
attribute :attr_name, type_cast, default: 123
Class Method Summary collapse
-
.valid_options ⇒ Object
Returns a Hash of valid options with the other options they are exclusive with.
Methods included from Base
Class Method Details
.valid_options ⇒ Object
Returns a Hash of valid options with the other options they are exclusive with
36 37 38 39 40 |
# File 'lib/sanitized/big_integer.rb', line 36 def self. { abs: [] } end |