Class: PactBroker::Diagnostic::Resources::Heartbeat
- Inherits:
-
Webmachine::Resource
- Object
- Webmachine::Resource
- PactBroker::Diagnostic::Resources::Heartbeat
- Defined in:
- lib/pact_broker/diagnostic/resources/heartbeat.rb
Instance Method Summary collapse
Instance Method Details
#allowed_methods ⇒ Object
8 9 10 |
# File 'lib/pact_broker/diagnostic/resources/heartbeat.rb', line 8 def allowed_methods ["GET"] end |
#content_types_provided ⇒ Object
12 13 14 |
# File 'lib/pact_broker/diagnostic/resources/heartbeat.rb', line 12 def content_types_provided [["application/hal+json", :to_json]] end |
#to_json ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/pact_broker/diagnostic/resources/heartbeat.rb', line 16 def to_json { "ok" => true, "_links" => { "self" => { "href" => request.uri.to_s } } }.to_json end |