Module: OnsOpenApi
- Extended by:
- Connection
- Defined in:
- lib/ons_openapi.rb,
lib/ons_openapi/connection.rb
Overview
See README for usage documentation.
Defined Under Namespace
Modules: Connection, DataHelper, NameHelper, UrlHelper Classes: Classification, Collection, Concept, Context, Dimension, GeographicalHierarchy, Item, Value
Constant Summary collapse
- VERSION =
"0.1.2"
Constants included from Connection
Connection::API_KEY, Connection::BASE_URI
Class Method Summary collapse
-
.context(name) ⇒ Object
Returns ONS dataset context with given name.
-
.context_names ⇒ Object
Returns names of ONS dataset contexts.
-
.contexts ⇒ Object
Returns ONS dataset contexts.
Methods included from Connection
get, post, request, request_uri, to_object
Class Method Details
.context(name) ⇒ Object
Returns ONS dataset context with given name
42 43 44 |
# File 'lib/ons_openapi.rb', line 42 def context name contexts.detect{|c| c.name == name} end |
.context_names ⇒ Object
Returns names of ONS dataset contexts
47 48 49 |
# File 'lib/ons_openapi.rb', line 47 def context_names contexts.map(&:name) end |