Exception: HaveAPI::ValidationError

Inherits:
Exception
  • Object
show all
Defined in:
lib/haveapi/params.rb

Instance Method Summary collapse

Constructor Details

#initialize(msg, errors = {}) ⇒ ValidationError

Returns a new instance of ValidationError.



7
8
9
10
# File 'lib/haveapi/params.rb', line 7

def initialize(msg, errors = {})
  @msg = msg
  @errors = errors
end

Instance Method Details

#messageObject



12
13
14
# File 'lib/haveapi/params.rb', line 12

def message
  @msg
end

#to_hashObject



16
17
18
# File 'lib/haveapi/params.rb', line 16

def to_hash
  @errors
end