Class: FastExists::Intelligence::DataModel
- Inherits:
-
Object
- Object
- FastExists::Intelligence::DataModel
- Defined in:
- lib/fast_exists/intelligence/data_model.rb
Instance Attribute Summary collapse
-
#analysis ⇒ Object
Returns the value of attribute analysis.
-
#audit ⇒ Object
Returns the value of attribute audit.
-
#doctor ⇒ Object
Returns the value of attribute doctor.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#health ⇒ Object
Returns the value of attribute health.
-
#stats ⇒ Object
Returns the value of attribute stats.
-
#timestamp ⇒ Object
Returns the value of attribute timestamp.
-
#uptime ⇒ Object
Returns the value of attribute uptime.
Instance Method Summary collapse
-
#initialize ⇒ DataModel
constructor
A new instance of DataModel.
- #to_h ⇒ Object
Constructor Details
#initialize ⇒ DataModel
Returns a new instance of DataModel.
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/fast_exists/intelligence/data_model.rb', line 17 def initialize @timestamp = Time.now.utc.iso8601 @uptime = (FastExists.uptime rescue 0) @environment = collect_environment_info @stats = FastExists.stats @health = {} @analysis = {} @audit = {} @doctor = {} end |
Instance Attribute Details
#analysis ⇒ Object
Returns the value of attribute analysis.
8 9 10 |
# File 'lib/fast_exists/intelligence/data_model.rb', line 8 def analysis @analysis end |
#audit ⇒ Object
Returns the value of attribute audit.
8 9 10 |
# File 'lib/fast_exists/intelligence/data_model.rb', line 8 def audit @audit end |
#doctor ⇒ Object
Returns the value of attribute doctor.
8 9 10 |
# File 'lib/fast_exists/intelligence/data_model.rb', line 8 def doctor @doctor end |
#environment ⇒ Object
Returns the value of attribute environment.
8 9 10 |
# File 'lib/fast_exists/intelligence/data_model.rb', line 8 def environment @environment end |
#health ⇒ Object
Returns the value of attribute health.
8 9 10 |
# File 'lib/fast_exists/intelligence/data_model.rb', line 8 def health @health end |
#stats ⇒ Object
Returns the value of attribute stats.
8 9 10 |
# File 'lib/fast_exists/intelligence/data_model.rb', line 8 def stats @stats end |
#timestamp ⇒ Object
Returns the value of attribute timestamp.
8 9 10 |
# File 'lib/fast_exists/intelligence/data_model.rb', line 8 def @timestamp end |
#uptime ⇒ Object
Returns the value of attribute uptime.
8 9 10 |
# File 'lib/fast_exists/intelligence/data_model.rb', line 8 def uptime @uptime end |
Instance Method Details
#to_h ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/fast_exists/intelligence/data_model.rb', line 28 def to_h { timestamp: @timestamp, uptime: @uptime, environment: @environment, stats: @stats, health: @health, analysis: @analysis, audit: @audit, doctor: @doctor } end |