Class: RealPage::DocumentParser::RentMatrices::Options
- Defined in:
- lib/real_page/document_parser/rent_matrices/options.rb
Overview
Parse the options from a GetRentMatrix response
Instance Attribute Summary
Attributes inherited from Base
#request_name, #request_params
Instance Method Summary collapse
-
#parse(options_array) ⇒ Array<RealPage::Model::RentMatrix::Option>
The options contained in this row.
Methods inherited from Base
Constructor Details
This class inherits a constructor from RealPage::DocumentParser::Base
Instance Method Details
#parse(options_array) ⇒ Array<RealPage::Model::RentMatrix::Option>
Returns the options contained in this row.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/real_page/document_parser/rent_matrices/options.rb', line 13 def parse() .map do |option_hash| = option_hash['Option'] = [] unless .is_a?(Array) .map do |option| concessions = Model::RentMatrix::Concessions.new(option['Concessions']) attrs = option.merge( 'Concessions' => concessions, 'LeaseStartDate' => option_hash['LeaseStartDate'] ) Model::RentMatrix::Option.new(attrs) end end.flatten end |