Module: HN::Configuration
- Included in:
- Client
- Defined in:
- lib/hn/configuration.rb
Constant Summary collapse
- VALID_CONFIGURATION_KEYS =
[:api_url, :headers]
- DEFAULT_API_URL =
'https://hacker-news.firebaseio.com/v0/'- DEFAULT_HEADERS =
{ accept: 'application/json', user_agent: "hn_api gem #{HN::Version}" }
Instance Method Summary collapse
Instance Method Details
#configure {|_self| ... } ⇒ Object
14 15 16 |
# File 'lib/hn/configuration.rb', line 14 def configure yield self end |
#reset ⇒ Object
18 19 20 21 22 |
# File 'lib/hn/configuration.rb', line 18 def reset self.api_url = DEFAULT_API_URL self.headers = DEFAULT_HEADERS self end |