Class: PactBroker::Diagnostic::Resources::Heartbeat
- Inherits:
-
BaseResource
- Object
- Webmachine::Resource
- BaseResource
- PactBroker::Diagnostic::Resources::Heartbeat
show all
- Defined in:
- lib/pact_broker/diagnostic/resources/heartbeat.rb
Instance Method Summary
collapse
#finish_request, #forbidden?, #initialize, #is_authorized?
#authenticated?
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
@@json ||= {
"ok" => true,
"_links" => {
"self" => {
"href" => request.uri.to_s
}
}
}.to_json
end
|