Exception: RegApi2::ContractError

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/reg_api2/contract_error.rb

Overview

API Contract Error. Raised when input parameters doesn't pass Ruby client tests.

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (ContractError) initialize(message, fields = [])

Returns a new instance of ContractError



10
11
12
13
14
15
# File 'lib/reg_api2/contract_error.rb', line 10

def initialize message, fields = []
  super message
  fields = []  if fields.nil?
  fields = [ fields ]  unless fields.kind_of?(Array)
  @fields = fields
end

Instance Attribute Details

- (Array<String>) fields (readonly)

Returns Wrong fields.

Returns:

  • (Array<String>)

    Wrong fields.



8
9
10
# File 'lib/reg_api2/contract_error.rb', line 8

def fields
  @fields
end