Sha256: 892c25b367ed40c2468c51b5125d3436543577c41face4dc9c493d7cd06e15f8
Contents?: true
Size: 526 Bytes
Versions: 9
Compression:
Stored size: 526 Bytes
Contents
# Type #### Rules ```ruby # 1. Check ``` #### Options Option | Type | Available | Default --- | --- | --- | --- is | class | | is_not | class | | #### Usage ```ruby class User < ActiveRecord::Base validates :input_0, type: { is: Array } validates :input_1, type: { is: Boolean } #=> Checks both TrueClass and FalseClass validates :input_2, type: { is: [Array, Hash] } validates :input_3, type: { is_not: CustomKlass } #=> Any Class based objects validates :input_4, type: { is_not: Integer } end ```
Version data entries
9 entries across 9 versions & 1 rubygems