Module: OMDBGateway
- Defined in:
- lib/omdbgateway.rb,
lib/omdbgateway/gateway.rb,
lib/omdbgateway/response_patcher.rb,
lib/omdbgateway/response_wrapper.rb
Defined Under Namespace
Classes: Gateway, ResponsePatcher, ResponseWrapper
Constant Summary collapse
- DEFAULT_API_ENDPOINT =
'http://omdbapi.com'- @@gateways =
{}
Class Method Summary collapse
Class Method Details
.gateway(endpoint = nil) ⇒ Object
10 11 12 13 14 |
# File 'lib/omdbgateway.rb', line 10 def self.gateway endpoint = nil endpoint = DEFAULT_API_ENDPOINT if endpoint.nil? @@gateways[endpoint] = Gateway.new(endpoint) unless @@gateways.key? endpoint @@gateways[endpoint] end |