Class: Twfy::MP
Instance Attribute Summary
Attributes inherited from DataElement
#client
Instance Method Summary
collapse
Methods inherited from DataElement
convert, #convert, convert_to_date, #initialize, #update_attributes, #with
Instance Method Details
32
33
34
35
|
# File 'lib/twfy/mp.rb', line 32
def (params={})
@comments ||= {}
@comments[params] ||= @client.(params.merge(pid: @person_id))
end
|
#debates(params = {}) ⇒ Object
27
28
29
30
|
# File 'lib/twfy/mp.rb', line 27
def debates(params={})
@debates ||= {}
@debates[params] ||= @client.debates(params.merge(person: @person_id, type: 'commons'))
end
|
#in_office? ⇒ Boolean
19
20
21
|
# File 'lib/twfy/mp.rb', line 19
def in_office?
@left_reason == 'still_in_office'
end
|
#info ⇒ Object
23
24
25
|
# File 'lib/twfy/mp.rb', line 23
def info
@info ||= @client.mp_info(id: @person_id)
end
|