Class: WsCee::Document
- Inherits:
-
Object
- Object
- WsCee::Document
- Defined in:
- lib/ws_cee_client/document.rb
Instance Attribute Summary collapse
-
#court ⇒ Object
readonly
Returns the value of attribute court.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#executor_company ⇒ Object
readonly
Returns the value of attribute executor_company.
-
#issue_date ⇒ Object
readonly
Returns the value of attribute issue_date.
-
#non_monetary ⇒ Object
readonly
Returns the value of attribute non_monetary.
-
#one_time_price ⇒ Object
readonly
Returns the value of attribute one_time_price.
-
#reference_number ⇒ Object
readonly
Returns the value of attribute reference_number.
-
#regular_price ⇒ Object
readonly
Returns the value of attribute regular_price.
-
#subjects ⇒ Object
readonly
Returns the value of attribute subjects.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(document_hash) ⇒ Document
constructor
A new instance of Document.
Constructor Details
#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 |
Instance Attribute Details
#court ⇒ Object (readonly)
Returns the value of attribute court.
6 7 8 |
# File 'lib/ws_cee_client/document.rb', line 6 def court @court end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
4 5 6 |
# File 'lib/ws_cee_client/document.rb', line 4 def description @description end |
#executor_company ⇒ Object (readonly)
Returns the value of attribute executor_company.
5 6 7 |
# File 'lib/ws_cee_client/document.rb', line 5 def executor_company @executor_company end |
#issue_date ⇒ Object (readonly)
Returns the value of attribute issue_date.
8 9 10 |
# File 'lib/ws_cee_client/document.rb', line 8 def issue_date @issue_date end |
#non_monetary ⇒ Object (readonly)
Returns the value of attribute non_monetary.
11 12 13 |
# File 'lib/ws_cee_client/document.rb', line 11 def non_monetary @non_monetary end |
#one_time_price ⇒ Object (readonly)
Returns the value of attribute one_time_price.
9 10 11 |
# File 'lib/ws_cee_client/document.rb', line 9 def one_time_price @one_time_price end |
#reference_number ⇒ Object (readonly)
Returns the value of attribute reference_number.
7 8 9 |
# File 'lib/ws_cee_client/document.rb', line 7 def reference_number @reference_number end |
#regular_price ⇒ Object (readonly)
Returns the value of attribute regular_price.
10 11 12 |
# File 'lib/ws_cee_client/document.rb', line 10 def regular_price @regular_price end |
#subjects ⇒ Object (readonly)
Returns the value of attribute subjects.
12 13 14 |
# File 'lib/ws_cee_client/document.rb', line 12 def subjects @subjects end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
3 4 5 |
# File 'lib/ws_cee_client/document.rb', line 3 def type @type end |