Class: PactBroker::Api::Resources::Integrations
- Inherits:
-
BaseResource
- Object
- BaseResource
- PactBroker::Api::Resources::Integrations
- Defined in:
- lib/pact_broker/api/resources/integrations.rb
Instance Method Summary collapse
- #allowed_methods ⇒ Object
- #content_types_provided ⇒ Object
- #delete_resource ⇒ Object
- #integrations ⇒ Object
- #policy_name ⇒ Object
- #to_dot ⇒ Object
- #to_json ⇒ Object
Instance Method Details
#allowed_methods ⇒ Object
16 17 18 |
# File 'lib/pact_broker/api/resources/integrations.rb', line 16 def allowed_methods ["GET", "OPTIONS", "DELETE"] end |
#content_types_provided ⇒ Object
9 10 11 12 13 14 |
# File 'lib/pact_broker/api/resources/integrations.rb', line 9 def content_types_provided [ ["text/vnd.graphviz", :to_dot], ["application/hal+json", :to_json] ] end |
#delete_resource ⇒ Object
32 33 34 35 |
# File 'lib/pact_broker/api/resources/integrations.rb', line 32 def delete_resource integration_service.delete_all true end |
#integrations ⇒ Object
28 29 30 |
# File 'lib/pact_broker/api/resources/integrations.rb', line 28 def integrations @integrations ||= integration_service.find_all end |
#policy_name ⇒ Object
37 38 39 |
# File 'lib/pact_broker/api/resources/integrations.rb', line 37 def policy_name :'integrations::integrations' end |
#to_dot ⇒ Object
20 21 22 |
# File 'lib/pact_broker/api/resources/integrations.rb', line 20 def to_dot PactBroker::Api::Renderers::IntegrationsDotRenderer.call(integrations) end |
#to_json ⇒ Object
24 25 26 |
# File 'lib/pact_broker/api/resources/integrations.rb', line 24 def to_json PactBroker::Api::Decorators::IntegrationsDecorator.new(integrations).to_json(user_options: decorator_context) end |