Sha256: 2acfa27ebb4be80a258797f7a93070c58c5b7ad306da9b52cbbcc7f9426c75af

Contents?: true

Size: 323 Bytes

Versions: 10

Compression:

Stored size: 323 Bytes

Contents

module Arpa
  module Validators
    class ResourceValidator
      include ActiveModel::Validations

      attr_reader :full_name, :name

      validates :full_name, :name, presence: true

      def initialize(resource)
        @full_name = resource.full_name
        @name      = resource.name
      end

    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
arpa-0.2.0 lib/arpa/validators/resource_validator.rb
arpa-0.1.0 lib/arpa/validators/resource_validator.rb
arpa-0.0.9 lib/arpa/validators/resource_validator.rb
arpa-0.0.8 lib/arpa/validators/resource_validator.rb
arpa-0.0.7 lib/arpa/validators/resource_validator.rb
arpa-0.0.6 lib/arpa/validators/resource_validator.rb
arpa-0.0.5 lib/arpa/validators/resource_validator.rb
arpa-0.0.4 lib/arpa/validators/resource_validator.rb
arpa-0.0.3 lib/arpa/validators/resource_validator.rb
arpa-0.0.2 lib/arpa/validators/resource_validator.rb