Class: ApplicationMessage
- Inherits:
-
Object
- Object
- ApplicationMessage
- Defined in:
- lib/api/application_message.rb
Instance Attribute Summary collapse
-
#metrics ⇒ Object
Returns the value of attribute metrics.
-
#ts ⇒ Object
Returns the value of attribute ts.
-
#uid ⇒ Object
Returns the value of attribute uid.
Instance Method Summary collapse
Instance Attribute Details
#metrics ⇒ Object
Returns the value of attribute metrics.
4 5 6 |
# File 'lib/api/application_message.rb', line 4 def metrics @metrics end |
#ts ⇒ Object
Returns the value of attribute ts.
4 5 6 |
# File 'lib/api/application_message.rb', line 4 def ts @ts end |
#uid ⇒ Object
Returns the value of attribute uid.
4 5 6 |
# File 'lib/api/application_message.rb', line 4 def uid @uid end |
Instance Method Details
#to_json ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/api/application_message.rb', line 6 def to_json msg = Hash.new msg[:uid] = @uid msg[:metrics] = @metrics msg[:ts] = Time.now.strftime('%s') msg.to_json end |