class PactBroker::Api::Resources::Branch
Public Instance Methods
allowed_methods()
click to toggle source
# File lib/pact_broker/api/resources/branch.rb, line 11 def allowed_methods ["GET", "DELETE", "OPTIONS"] end
content_types_provided()
click to toggle source
# File lib/pact_broker/api/resources/branch.rb, line 7 def content_types_provided [["application/hal+json", :to_json]] end
delete_resource()
click to toggle source
# File lib/pact_broker/api/resources/branch.rb, line 23 def delete_resource branch_service.delete_branch(branch) true end
policy_name()
click to toggle source
# File lib/pact_broker/api/resources/branch.rb, line 28 def policy_name :'versions::branch' end
resource_exists?()
click to toggle source
# File lib/pact_broker/api/resources/branch.rb, line 15 def resource_exists? !!branch end
to_json()
click to toggle source
# File lib/pact_broker/api/resources/branch.rb, line 19 def to_json decorator_class(:branch_decorator).new(branch).to_json(**decorator_options) end
Private Instance Methods
branch()
click to toggle source
# File lib/pact_broker/api/resources/branch.rb, line 34 def branch @branch_version ||= branch_service.find_branch(**identifier_from_path.slice(:pacticipant_name, :branch_name)) end