Class: GovTrack::Bill
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#==, #eql?, find_by_id, find_by_uri, method_missing
Constructor Details
#initialize(attributes = {}) ⇒ Bill
Returns a new instance of Bill.
4
5
6
7
8
|
# File 'lib/govtrack/bill.rb', line 4
def initialize(attributes={})
super
@introduced_date = Date.parse(@introduced_date) if @introduced_date
@current_status_date = Date.parse(@current_status_date) if @current_status_date
end
|
Class Method Details
.find(args) ⇒ Object
10
11
12
13
14
|
# File 'lib/govtrack/bill.rb', line 10
def self.find(args)
args[:bill_type] = args[:bill_type].to_bill_type_number if args[:bill_type]
args[:current_status] = args[:current_status].to_current_status_number if args[:current_status]
super
end
|
Instance Method Details
20
21
22
23
24
25
26
27
28
|
# File 'lib/govtrack/bill.rb', line 20
def
if [0].class == GovTrack::Person
else
.map! { ||
GovTrack::Person.find_by_uri()
}
end
end
|
16
17
18
|
# File 'lib/govtrack/bill.rb', line 16
def
.class == GovTrack::Person ? : = GovTrack::Person.find_by_id(['id'])
end
|