Method: WsCee::Document#initialize
- Defined in:
- lib/ws_cee_client/document.rb
#initialize(document_hash) ⇒ Document
Returns a new instance of Document.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/ws_cee_client/document.rb', line 14 def initialize(document_hash) @type = document_hash[:type] @description = document_hash[:description] @executor_company = document_hash[:executor_company] @court = document_hash[:court] @reference_number = document_hash[:reference_number] @issue_date = document_hash[:issue_date] @one_time_price = document_hash[:one_time_price] @regular_price = document_hash[:regular_price] @non_monetary = document_hash[:non_monetary] @subjects = [] parse_subject document_hash[:subject] rescue NoMethodError raise WsCee::ParsingError end |