Sha256: 0c9b77429c1a28ac72d685bd4246667011ef7e360ca93ee558aeafe29cdaf9b5
Contents?: true
Size: 339 Bytes
Versions: 2
Compression:
Stored size: 339 Bytes
Contents
# frozen_string_literal: true class Company include ActiveModel::Validations include ActiveModel::Conversion extend ActiveModel::Naming attr_accessor :cnpj, :name validates :cnpj, cnpj: true def initialize(attributes = {}) attributes.each do |key, value| instance_variable_set("@#{key}", value) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
validates_cnpj-3.1.0 | spec/fake_app/company.rb |
validates_cnpj-3.0.0 | spec/fake_app/company.rb |