Sha256: 5c2cfcc0e5cafcd7e3e5ab0b340e2155c5ac49bdcdc2555242c14fa63e4fcbfd

Contents?: true

Size: 367 Bytes

Versions: 8

Compression:

Stored size: 367 Bytes

Contents

 module Compel
  module Validation

    class Result

      attr_reader :value,
                  :klass,
                  :error_message

      def initialize(value, klass, error_message = nil)
        @value = value
        @klass = klass
        @error_message = error_message
      end

      def valid?
        @error_message.nil?
      end

    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
compel-0.5.1 lib/compel/validation/result.rb
compel-0.5.0 lib/compel/validation/result.rb
compel-0.4.3 lib/compel/validation/result.rb
compel-0.4.2 lib/compel/validation/result.rb
compel-0.4.0 lib/compel/validation/result.rb
compel-0.3.7 lib/compel/validation/result.rb
compel-0.3.6 lib/compel/validation/result.rb
compel-0.3.4 lib/compel/validation/result.rb