Sha256: e76e7857d978be677700050042206934144be5bdac02bd9939f054e8daf7094a

Contents?: true

Size: 351 Bytes

Versions: 1

Compression:

Stored size: 351 Bytes

Contents

require 'constructor'

class ResultVerifier #:nodoc:
  constructor :minilab_hardware

  def verify(result, user_message="Command")
    if result[:error]
      library_message = @minilab_hardware.get_error_string(result[:error])
      raise "#{user_message} caused a hardware error: #{library_message}"
    end

    return true
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
minilab-1.0.0-mswin32 lib/result_verifier.rb