Class: PactBroker::Client::Pacts::ListLatestVersions
- Inherits:
-
Object
- Object
- PactBroker::Client::Pacts::ListLatestVersions
- Includes:
- HalClientMethods
- Defined in:
- lib/pact_broker/client/pacts/list_latest_versions.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(pact_broker_base_url, output, pact_broker_client_options) ⇒ ListLatestVersions
constructor
A new instance of ListLatestVersions.
Methods included from HalClientMethods
#create_http_client, #create_index_entry_point
Constructor Details
#initialize(pact_broker_base_url, output, pact_broker_client_options) ⇒ ListLatestVersions
Returns a new instance of ListLatestVersions.
16 17 18 19 |
# File 'lib/pact_broker/client/pacts/list_latest_versions.rb', line 16 def initialize(pact_broker_base_url, output, ) @index_entry_point = create_index_entry_point(pact_broker_base_url, ) @output = output end |
Class Method Details
.call(pact_broker_base_url, output, pact_broker_client_options) ⇒ Object
12 13 14 |
# File 'lib/pact_broker/client/pacts/list_latest_versions.rb', line 12 def self.call(pact_broker_base_url, output, ) new(pact_broker_base_url, output, ).call end |
Instance Method Details
#call ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/pact_broker/client/pacts/list_latest_versions.rb', line 21 def call = if output == 'json' versions_resource.response.raw_body else to_text(versions) end PactBroker::Client::CommandResult.new(true, ) rescue StandardError => e PactBroker::Client::CommandResult.new(false, e.) end |