Class: PactBroker::Api::Resources::PacticipantsForLabel
- Inherits:
-
BaseResource
- Object
- PactBroker::Api::Resources::PacticipantsForLabel
- Defined in:
- lib/pact_broker/api/resources/pacticipants_for_label.rb
Instance Method Summary collapse
- #allowed_methods ⇒ Object
- #content_types_provided ⇒ Object
- #generate_json(pacticipants) ⇒ Object
- #policy_name ⇒ Object
- #to_json ⇒ Object
Instance Method Details
#allowed_methods ⇒ Object
13 14 15 |
# File 'lib/pact_broker/api/resources/pacticipants_for_label.rb', line 13 def allowed_methods ["GET", "OPTIONS"] end |
#content_types_provided ⇒ Object
9 10 11 |
# File 'lib/pact_broker/api/resources/pacticipants_for_label.rb', line 9 def content_types_provided [["application/hal+json", :to_json]] end |
#generate_json(pacticipants) ⇒ Object
21 22 23 |
# File 'lib/pact_broker/api/resources/pacticipants_for_label.rb', line 21 def generate_json pacticipants decorator_class(:pacticipant_collection_decorator).new(pacticipants).to_json() end |
#policy_name ⇒ Object
25 26 27 |
# File 'lib/pact_broker/api/resources/pacticipants_for_label.rb', line 25 def policy_name :'pacticipants::pacticipants' end |
#to_json ⇒ Object
17 18 19 |
# File 'lib/pact_broker/api/resources/pacticipants_for_label.rb', line 17 def to_json generate_json(pacticipant_service.find identifier_from_path ) end |