spec/fake_app/subnet.rb in validates_host-1.1.0 vs spec/fake_app/subnet.rb in validates_host-1.2.0
- old
+ new
@@ -1,15 +1,11 @@
+# frozen_string_literal: true
+
class Subnet
include ActiveModel::Validations
include ActiveModel::Conversion
extend ActiveModel::Naming
attr_accessor :id, :value
- validates :value, :subnet => true
-
- def initialize(attributes = {})
- attributes.each do |name, value|
- send("#{name}=", value)
- end
- end
-end
\ No newline at end of file
+ validates :value, subnet: true
+end