Exception: ChangeHealthcare::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/change_healthcare.rb,
lib/change_healthcare/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xml_root_node) ⇒ Error

Returns a new instance of Error.



4
5
6
7
8
9
# File 'lib/change_healthcare/error.rb', line 4

def initialize(xml_root_node)
  @root = xml_root_node
  root_children = xml_root_node.children
  @code = root_children[0].present? ? root_children[0].children[0].to_s : ""
  @description = root_children[1].present? ? root_children[1].children[1].to_s : ""
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



2
3
4
# File 'lib/change_healthcare/error.rb', line 2

def code
  @code
end

#descriptionObject (readonly)

Returns the value of attribute description.



2
3
4
# File 'lib/change_healthcare/error.rb', line 2

def description
  @description
end

#rootObject (readonly)

Returns the value of attribute root.



2
3
4
# File 'lib/change_healthcare/error.rb', line 2

def root
  @root
end