Class: Braintree::ValidationError

Inherits:
Object
  • Object
show all
Includes:
BaseModule
Defined in:
lib/braintree/validation_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from BaseModule

included

Methods included from BaseModule::Methods

#copy_instance_variables_from_object, #return_object_or_raise, #set_instance_variables_from_hash, #singleton_class

Constructor Details

#initialize(attributes) ⇒ ValidationError

Returns a new instance of ValidationError.



7
8
9
# File 'lib/braintree/validation_error.rb', line 7

def initialize(attributes)
  set_instance_variables_from_hash attributes
end

Instance Attribute Details

#attributeObject (readonly)

Returns the value of attribute attribute.



5
6
7
# File 'lib/braintree/validation_error.rb', line 5

def attribute
  @attribute
end

#codeObject (readonly)

Returns the value of attribute code.



5
6
7
# File 'lib/braintree/validation_error.rb', line 5

def code
  @code
end

#messageObject (readonly)

Returns the value of attribute message.



5
6
7
# File 'lib/braintree/validation_error.rb', line 5

def message
  @message
end

Instance Method Details

#inspectObject

:nodoc:



11
12
13
# File 'lib/braintree/validation_error.rb', line 11

def inspect # :nodoc:
  "#<#{self.class} (#{code}) #{message}>"
end