spec/fake_app/company.rb in validates_cnpj-2.0.1 vs spec/fake_app/company.rb in validates_cnpj-3.0.0
- old
+ new
@@ -1,15 +1,17 @@
+# frozen_string_literal: true
+
class Company
include ActiveModel::Validations
include ActiveModel::Conversion
extend ActiveModel::Naming
attr_accessor :cnpj, :name
- validates :cnpj, :cnpj => true
+ validates :cnpj, cnpj: true
def initialize(attributes = {})
attributes.each do |key, value|
instance_variable_set("@#{key}", value)
end
end
-end
\ No newline at end of file
+end