Class: NodeHeartbeat::BeatOnce
- Defined in:
- lib/node_heartbeat/beat_once.rb
Instance Attribute Summary collapse
-
#bucket ⇒ Object
Returns the value of attribute bucket.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(bucket:) ⇒ BeatOnce
constructor
A new instance of BeatOnce.
Methods inherited from Base
Constructor Details
#initialize(bucket:) ⇒ BeatOnce
Returns a new instance of BeatOnce.
9 10 11 |
# File 'lib/node_heartbeat/beat_once.rb', line 9 def initialize(bucket:) self.bucket = bucket end |
Instance Attribute Details
#bucket ⇒ Object
Returns the value of attribute bucket.
7 8 9 |
# File 'lib/node_heartbeat/beat_once.rb', line 7 def bucket @bucket end |
Instance Method Details
#call ⇒ Object
13 14 15 16 17 |
# File 'lib/node_heartbeat/beat_once.rb', line 13 def call puts 'Heartbeat!' private_ip = GetPrivateIP.call.private_ip UploadIP.call(ip: private_ip, bucket: self.bucket) end |