Class: Ixtlan::Core::Heartbeat::Resource
- Inherits:
-
Object
- Object
- Ixtlan::Core::Heartbeat::Resource
- Defined in:
- lib/ixtlan/core/heartbeat.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
Returns the value of attribute count.
-
#failure ⇒ Object
Returns the value of attribute failure.
-
#local ⇒ Object
readonly
Returns the value of attribute local.
-
#remote ⇒ Object
readonly
Returns the value of attribute remote.
Instance Method Summary collapse
-
#initialize(local, remote) ⇒ Resource
constructor
A new instance of Resource.
- #to_log ⇒ Object
Constructor Details
#initialize(local, remote) ⇒ Resource
Returns a new instance of Resource.
8 9 10 11 12 13 |
# File 'lib/ixtlan/core/heartbeat.rb', line 8 def initialize(local, remote) @count = 0 @failures = 0 @local = local @remote = remote end |
Instance Attribute Details
#count ⇒ Object
Returns the value of attribute count.
6 7 8 |
# File 'lib/ixtlan/core/heartbeat.rb', line 6 def count @count end |
#failure ⇒ Object
Returns the value of attribute failure.
6 7 8 |
# File 'lib/ixtlan/core/heartbeat.rb', line 6 def failure @failure end |
#local ⇒ Object (readonly)
Returns the value of attribute local.
5 6 7 |
# File 'lib/ixtlan/core/heartbeat.rb', line 5 def local @local end |
#remote ⇒ Object (readonly)
Returns the value of attribute remote.
5 6 7 |
# File 'lib/ixtlan/core/heartbeat.rb', line 5 def remote @remote end |
Instance Method Details
#to_log ⇒ Object
15 16 17 |
# File 'lib/ixtlan/core/heartbeat.rb', line 15 def to_log "update #{@local} - total: #{@count + @failures} success: #{@count} failures: #{@failures}" end |