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
#base_url, #forbidden?, #is_authorized?
#authenticated?
Instance Method Details
#allowed_methods ⇒ Object
7
8
9
|
# File 'lib/pact_broker/diagnostic/resources/heartbeat.rb', line 7
def allowed_methods
["GET"]
end
|
#content_types_provided ⇒ Object
11
12
13
|
# File 'lib/pact_broker/diagnostic/resources/heartbeat.rb', line 11
def content_types_provided
[["application/hal+json", :to_json]]
end
|
#to_json ⇒ Object
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/pact_broker/diagnostic/resources/heartbeat.rb', line 15
def to_json
{
"ok" => true,
"_links" => {
"self" => {
"href" => base_url + "/diagnostic/status/heartbeat"
}
}
}.to_json
end
|