Class: PactBroker::Api::Resources::CanIDeployPacticipantVersion
- Inherits:
-
Matrix
- Object
- BaseResource
- Matrix
- PactBroker::Api::Resources::CanIDeployPacticipantVersion
- Defined in:
- lib/pact_broker/api/resources/can_i_deploy_pacticipant_version.rb
Instance Attribute Summary
Attributes inherited from Matrix
Instance Method Summary collapse
-
#initialize ⇒ CanIDeployPacticipantVersion
constructor
A new instance of CanIDeployPacticipantVersion.
- #policy_name ⇒ Object
- #resource_exists? ⇒ Boolean
Methods inherited from Matrix
#allowed_methods, #content_types_provided, #malformed_request?, #to_json, #to_text
Constructor Details
#initialize ⇒ CanIDeployPacticipantVersion
Returns a new instance of CanIDeployPacticipantVersion.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/pact_broker/api/resources/can_i_deploy_pacticipant_version.rb', line 9 def initialize super selector = PactBroker::Matrix::UnresolvedSelector.new(pacticipant_name: pacticipant_name, latest: true, tag: identifier_from_path[:tag]) @options = { latestby: 'cvp', latest: true, tag: identifier_from_path[:to] } @selectors = [selector] end |
Instance Method Details
#policy_name ⇒ Object
24 25 26 |
# File 'lib/pact_broker/api/resources/can_i_deploy_pacticipant_version.rb', line 24 def policy_name :'matrix::can_i_deploy' end |
#resource_exists? ⇒ Boolean
20 21 22 |
# File 'lib/pact_broker/api/resources/can_i_deploy_pacticipant_version.rb', line 20 def resource_exists? !!version end |