Module: Caselaw::Jurisdictions
- Included in:
- Client
- Defined in:
- lib/caselaw/client/jurisdictions.rb
Constant Summary collapse
- API_ENDPOINT =
"jurisdictions/"
Instance Method Summary collapse
-
#jurisdiction(jurisdiction_term) ⇒ Object
Search for a specific Jurisdiction.
-
#search_jurisdictions ⇒ Object
Return all Jurisdictions.
Instance Method Details
#jurisdiction(jurisdiction_term) ⇒ Object
Search for a specific Jurisdiction
11 12 13 14 15 |
# File 'lib/caselaw/client/jurisdictions.rb', line 11 def jurisdiction(jurisdiction_term) slug = slug(jurisdiction_term) path = API_ENDPOINT + slug Hashie::Mash.new(request(path)) end |
#search_jurisdictions ⇒ Object
Return all Jurisdictions
6 7 8 |
# File 'lib/caselaw/client/jurisdictions.rb', line 6 def search_jurisdictions Hashie::Mash.new(request(API_ENDPOINT)) end |