Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjcumming committed Sep 24, 2024
1 parent ed3cf26 commit 4576d8a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/vets/attributes/value.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# frozen_string_literal: true

module Vets
module Attributes
class Value

def self.cast(name, klass, value, array: false)
new(name, klass, array:).setter_value(value)
end
Expand Down Expand Up @@ -43,9 +44,8 @@ def coerce_to_class(value)
end

def validate_type(value)
if (@array && value.is_a?(Array)) || value.is_a?(@klass) || value.nil?
return
end
return if (@array && value.is_a?(Array)) || value.is_a?(@klass) || value.nil?

raise TypeError, "#{@name} must be a #{@klass}"
end
end
Expand Down

0 comments on commit 4576d8a

Please sign in to comment.