Class: MetricSystem::Server::Event
- Defined in:
- lib/metric_system/server.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#table ⇒ Object
Returns the value of attribute table.
-
#time ⇒ Object
Returns the value of attribute time.
-
#value ⇒ Object
Returns the value of attribute value.
Class Method Summary collapse
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
29 30 31 |
# File 'lib/metric_system/server.rb', line 29 def name @name end |
#table ⇒ Object
Returns the value of attribute table
29 30 31 |
# File 'lib/metric_system/server.rb', line 29 def table @table end |
#time ⇒ Object
Returns the value of attribute time
29 30 31 |
# File 'lib/metric_system/server.rb', line 29 def time @time end |
#value ⇒ Object
Returns the value of attribute value
29 30 31 |
# File 'lib/metric_system/server.rb', line 29 def value @value end |
Class Method Details
.parse(line) ⇒ Object
30 31 32 33 34 35 |
# File 'lib/metric_system/server.rb', line 30 def self.parse(line) table, name, value, time, remainder = line.split(" ", 5) value = value.to_f time = time != "" ? time.to_i : nil new(table, name, value, time) end |