Class: JustInform::InformationCollectionRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/just_inform/information_collection_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ InformationCollectionRequest

Returns a new instance of InformationCollectionRequest.



9
10
11
# File 'lib/just_inform/information_collection_request.rb', line 9

def initialize(data)
  @raw_data = data
end

Instance Attribute Details

#raw_dataObject

Returns the value of attribute raw_data.



3
4
5
# File 'lib/just_inform/information_collection_request.rb', line 3

def raw_data
  @raw_data
end

Instance Method Details

#abstractObject



13
14
15
# File 'lib/just_inform/information_collection_request.rb', line 13

def abstract
  @raw_data.at_css('Abstract').content
end

#agency_codeObject



17
18
19
# File 'lib/just_inform/information_collection_request.rb', line 17

def agency_code
  @raw_data.at_css('AgencyCode').content
end

#icr_reference_numberObject



21
22
23
# File 'lib/just_inform/information_collection_request.rb', line 21

def icr_reference_number
  @raw_data.at_css('ICRReferenceNumber').content
end

#inspectObject



5
6
7
# File 'lib/just_inform/information_collection_request.rb', line 5

def inspect
  title
end

#omb_control_numberObject



25
26
27
# File 'lib/just_inform/information_collection_request.rb', line 25

def omb_control_number
  @raw_data.at_css('OMBControlNumber').content
end

#titleObject



29
30
31
# File 'lib/just_inform/information_collection_request.rb', line 29

def title
  @raw_data.at_css('Title').content
end

#total_burden_hoursObject Also known as: burden_hours, burden



33
34
35
# File 'lib/just_inform/information_collection_request.rb', line 33

def total_burden_hours
  @raw_data.at_css('Burden BurdenHour TotalQuantity').content.to_i
end

#total_costObject Also known as: cost



39
40
41
# File 'lib/just_inform/information_collection_request.rb', line 39

def total_cost
  @raw_data.at_css('Burden BurdenCost TotalAmount').content.to_i
end

#total_responsesObject Also known as: responses



44
45
46
# File 'lib/just_inform/information_collection_request.rb', line 44

def total_responses
  @raw_data.at_css('Burden BurdenResponse TotalQuantity').content.to_i
end