Class: FederalRegister::Agency
- Defined in:
- lib/federal_register/agency.rb
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
add_attribute, #fetch_full, #full?, #initialize, override_base_uri
Methods inherited from Client
Constructor Details
This class inherits a constructor from FederalRegister::Base
Class Method Details
.all ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/federal_register/agency.rb', line 13 def self.all response = get('/agencies.json') if response.success? response.map do |hsh| new(hsh, :full => true) end else raise response.inspect end end |
Instance Method Details
#logo_url(size) ⇒ Object
24 25 26 27 28 |
# File 'lib/federal_register/agency.rb', line 24 def logo_url(size) if attributes.has_key?("logo") attributes["logo"]["#{size}_url"] || raise("size '#{size}' not a valid image size") end end |