Class: OpenCongressApi::Fetcher::Bills

Inherits:
Base
  • Object
show all
Defined in:
lib/opencongress_api/fetcher/bills.rb

Instance Method Summary collapse

Methods inherited from Base

#fetch

Constructor Details

#initializeBills

Returns a new instance of Bills.



4
5
6
# File 'lib/opencongress_api/fetcher/bills.rb', line 4

def initialize
  @type = :bills
end

Instance Method Details

#format_result(result) ⇒ Object



8
9
10
# File 'lib/opencongress_api/fetcher/bills.rb', line 8

def format_result(result)
  OpenCongressApi::Type::Bill.new(result)
end

#is_json?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/opencongress_api/fetcher/bills.rb', line 16

def is_json?
  false
end

#json_result(json) ⇒ Object



12
13
14
# File 'lib/opencongress_api/fetcher/bills.rb', line 12

def json_result(json)
  json['bill']
end