Class: Dotloop::LoopDetail

Inherits:
Object
  • Object
show all
Includes:
ParseData
Defined in:
lib/dotloop/loop_detail.rb

Constant Summary collapse

FIXED_SECTIONS =
i[
  contract_dates contract_info financials geographic_description
  listing_information offer_dates property_address property referral
].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ParseData

#parse_data

Constructor Details

#initialize(data) ⇒ LoopDetail

Returns a new instance of LoopDetail.



12
13
14
15
# File 'lib/dotloop/loop_detail.rb', line 12

def initialize(data)
  @details = FIXED_SECTIONS.each_with_object({}) { |key, memo| memo[key] = {} }.merge(contacts: [])
  parse_data(data)
end

Instance Attribute Details

#detailsObject

Returns the value of attribute details.



6
7
8
# File 'lib/dotloop/loop_detail.rb', line 6

def details
  @details
end