Sha256: 57d232c0a0f83d55d9db66a34ced2023af79b9a6b2e2dfef99a1dedfd48afcfe

Contents?: true

Size: 310 Bytes

Versions: 2

Compression:

Stored size: 310 Bytes

Contents

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-2.0.1 spec/fake_app/company.rb
validates_cnpj-2.0.0 spec/fake_app/company.rb