Method: WsCee::CauseDetail#initialize

Defined in:
lib/ws_cee_client/cause_detail.rb

#initialize(cause_detail_hash) ⇒ CauseDetail

Returns a new instance of CauseDetail.



7
8
9
10
11
12
13
14
15
# File 'lib/ws_cee_client/cause_detail.rb', line 7

def initialize(cause_detail_hash)
  @code = cause_detail_hash[:code]
  @description = cause_detail_hash[:description]

  @documents = []
  parse_document cause_detail_hash[:document]
rescue NoMethodError
  raise WsCee::ParsingError
end