Sha256: 1e6049a58aaef5ff800549c16043fc20cd24d50a767140be5d1c01cafc22632f
Contents?: true
Size: 401 Bytes
Versions: 7
Compression:
Stored size: 401 Bytes
Contents
libs = %w[ active_model active_support/core_ext pry rspec validation_matcher ] libs.each { |lib| require lib } class Thing extend ActiveModel::Naming include ActiveModel::Conversion include ActiveModel::Validations attr_accessor :field_a, :field_b, :field_c validates :field_b, presence: true validates :field_c, numericality: { allow_nil: false, only_integer: true } end
Version data entries
7 entries across 7 versions & 1 rubygems