Class: Upcheck::Component

Inherits:
Resource show all
Defined in:
lib/upcheck/component.rb

Constant Summary collapse

STATUS_OPERATIONAL =
"operational"
STATUS_DEGRADED_PERFORMANCE =
"degraded_performance"
STATUS_PARTIAL_OUTAGE =
"partial_outage"
STATUS_MAJOR_OUTAGE =
"major_outage"
STATUS_UNDER_MAINTENANCE =
"under_maintenance"

Instance Method Summary collapse

Methods inherited from Resource

attribute, build_all, #initialize

Constructor Details

This class inherits a constructor from Upcheck::Resource

Instance Method Details

#degraded?Boolean

Returns:

  • (Boolean)


14
# File 'lib/upcheck/component.rb', line 14

def degraded? = status == STATUS_DEGRADED_PERFORMANCE

#maintenance?Boolean

Returns:

  • (Boolean)


17
# File 'lib/upcheck/component.rb', line 17

def maintenance? = status == STATUS_UNDER_MAINTENANCE

#major_outage?Boolean

Returns:

  • (Boolean)


16
# File 'lib/upcheck/component.rb', line 16

def major_outage? = status == STATUS_MAJOR_OUTAGE

#operational?Boolean

Returns:

  • (Boolean)


13
# File 'lib/upcheck/component.rb', line 13

def operational? = status == STATUS_OPERATIONAL

#partial_outage?Boolean

Returns:

  • (Boolean)


15
# File 'lib/upcheck/component.rb', line 15

def partial_outage? = status == STATUS_PARTIAL_OUTAGE