Class: Ecfr::AdminService::Agency
- Defined in:
- lib/ecfr/admin_service/agency.rb
Constant Summary collapse
- AGENCIES_PATH =
"v1/agencies.json"
Constants inherited from Base
Base::SUPPORTED_ARRAY_ACCESSORS
Instance Attribute Summary collapse
-
#cfr_references ⇒ [Ecfr::Common::Hierarchy]
readonly
portions of the CFR this agency is responsible for, expected keys are only :title, :subtitle, :chapter, :subchapter, and :part.
-
#children ⇒ [Agency]
readonly
sub-agencies of the current agency.
-
#display_name ⇒ String
readonly
official name of agency, including parent (if any).
-
#name ⇒ String
readonly
official name of agency.
-
#short_name ⇒ String
readonly
agency acronym.
-
#slug ⇒ String
readonly
normalized, unique agency identifier in the eCFR system.
-
#sortable_name ⇒ String
readonly
sortable version of agency name.
Attributes inherited from Base
#metadata, #request_data, #response_status, #results
Class Method Summary collapse
-
.all ⇒ [<Agency>]
Retrieve the list of all agencies, their subagencies and the portions of the CFR they are responsible for.
Methods inherited from Base
base_url, service_name, service_path
Methods inherited from Base
basic_auth_client_options, #each, #initialize, metadata, metadata_key, result_key
Methods included from Extensible
Methods included from Ecfr::AttributeMethodDefinition
Methods inherited from Client
build, cache_key, client, client_pool, delete, execute, get, handle_response, perform, post, purge
Methods included from ParallelClient
Constructor Details
This class inherits a constructor from Ecfr::Base
Instance Attribute Details
#cfr_references ⇒ [Ecfr::Common::Hierarchy] (readonly)
portions of the CFR this agency is responsible for, expected keys are only :title, :subtitle, :chapter, :subchapter, and :part
12 13 14 15 |
# File 'lib/ecfr/admin_service/agency.rb', line 12 attribute :cfr_references, type: Array(Ecfr::Common::Hierarchy), desc: "portions of the CFR this agency is responsible for, expected keys are only :title, :subtitle, :chapter, :subchapter, and :part" |
#children ⇒ [Agency] (readonly)
sub-agencies of the current agency
17 18 |
# File 'lib/ecfr/admin_service/agency.rb', line 17 attribute :children, type: Array(Agency), desc: "sub-agencies of the current agency" |
#display_name ⇒ String (readonly)
official name of agency, including parent (if any)
6 |
# File 'lib/ecfr/admin_service/agency.rb', line 6 attribute :display_name, desc: "official name of agency, including parent (if any)" |
#name ⇒ String (readonly)
official name of agency
7 |
# File 'lib/ecfr/admin_service/agency.rb', line 7 attribute :name, desc: "official name of agency" |
#short_name ⇒ String (readonly)
agency acronym
8 |
# File 'lib/ecfr/admin_service/agency.rb', line 8 attribute :short_name, desc: "agency acronym" |
#slug ⇒ String (readonly)
normalized, unique agency identifier in the eCFR system
9 |
# File 'lib/ecfr/admin_service/agency.rb', line 9 attribute :slug, desc: "normalized, unique agency identifier in the eCFR system" |
#sortable_name ⇒ String (readonly)
sortable version of agency name
10 |
# File 'lib/ecfr/admin_service/agency.rb', line 10 attribute :sortable_name, desc: "sortable version of agency name" |
Class Method Details
.all ⇒ [<Agency>]
Retrieve the list of all agencies, their subagencies and the portions of the CFR they are responsible for
28 29 30 31 32 33 |
# File 'lib/ecfr/admin_service/agency.rb', line 28 def self.all perform( :get, AGENCIES_PATH ) end |