Class: Idml::Validation::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/idml/validation/result.rb

Overview

Immutable result of validating one part against its RNG schema. #ok? is true when there are no errors. #errors is an Array of Jing-formatted error strings (with line numbers).

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#errorsObject

Returns the value of attribute errors

Returns:

  • (Object)

    the current value of errors



8
9
10
# File 'lib/idml/validation/result.rb', line 8

def errors
  @errors
end

#okObject

Returns the value of attribute ok

Returns:

  • (Object)

    the current value of ok



8
9
10
# File 'lib/idml/validation/result.rb', line 8

def ok
  @ok
end

#part_nameObject

Returns the value of attribute part_name

Returns:

  • (Object)

    the current value of part_name



8
9
10
# File 'lib/idml/validation/result.rb', line 8

def part_name
  @part_name
end

Instance Method Details

#ok?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/idml/validation/result.rb', line 9

def ok?
  ok
end