Class: PactBroker::Client::PactBrokerClient
- Inherits:
-
Object
- Object
- PactBroker::Client::PactBrokerClient
- Defined in:
- lib/pact_broker/client/pact_broker_client.rb
Constant Summary collapse
- DEFAULT_OPTIONS =
{base_url: DEFAULT_PACT_BROKER_BASE_URL}
Instance Attribute Summary collapse
-
#base_url ⇒ Object
readonly
Returns the value of attribute base_url.
-
#client_options ⇒ Object
readonly
Returns the value of attribute client_options.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ PactBrokerClient
constructor
A new instance of PactBrokerClient.
- #pacticipants ⇒ Object
- #pacts ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ PactBrokerClient
Returns a new instance of PactBrokerClient.
19 20 21 22 23 |
# File 'lib/pact_broker/client/pact_broker_client.rb', line 19 def initialize = {} = DEFAULT_OPTIONS.merge() @base_url = [:base_url] @client_options = [:client_options] || {} end |
Instance Attribute Details
#base_url ⇒ Object (readonly)
Returns the value of attribute base_url.
17 18 19 |
# File 'lib/pact_broker/client/pact_broker_client.rb', line 17 def base_url @base_url end |
#client_options ⇒ Object (readonly)
Returns the value of attribute client_options.
17 18 19 |
# File 'lib/pact_broker/client/pact_broker_client.rb', line 17 def @client_options end |
Instance Method Details
#pacticipants ⇒ Object
25 26 27 |
# File 'lib/pact_broker/client/pact_broker_client.rb', line 25 def pacticipants PactBroker::Client::Pacticipants.new base_url: base_url, client_options: end |
#pacts ⇒ Object
29 30 31 |
# File 'lib/pact_broker/client/pact_broker_client.rb', line 29 def pacts PactBroker::Client::Pacts.new base_url: base_url, client_options: end |