Module: Ekg
- Defined in:
- lib/ekg.rb,
lib/ekg/data.rb,
lib/ekg/version.rb
Defined Under Namespace
Classes: Data
Constant Summary collapse
- VERSION =
"1.1.1"
Class Attribute Summary collapse
-
.config ⇒ Object
Returns the value of attribute config.
Class Method Summary collapse
Class Attribute Details
.config ⇒ Object
Returns the value of attribute config.
8 9 10 |
# File 'lib/ekg.rb', line 8 def config @config end |
Class Method Details
.lub_dub ⇒ Object
10 11 12 13 14 15 |
# File 'lib/ekg.rb', line 10 def lub_dub Ekg::Data.send_data( { name: Ekg.config[:name], version: Ekg.config[:version], time: Time.now } ) rescue end |
.time_since_last_heartbeat ⇒ Object
17 18 19 20 |
# File 'lib/ekg.rb', line 17 def time_since_last_heartbeat return nil unless time = the_last_heartbeat_time Time.now - time end |