Class: RRDNotifier::BindataParser::Part

Inherits:
BinData::Record
  • Object
show all
Defined in:
lib/rrd-grapher/notifier/parsers/bindata_parser.rb

Constant Summary collapse

STR_FIELDS =
[HOST, PLUGIN, PLUGIN_INSTANCE, TYPE, TYPE_INSTANCE, MESSAGE]
INT_FIELDS =
[TIME, INTERVAL, SEVERITY]

Instance Method Summary collapse

Instance Method Details

#get_valueObject



77
78
79
80
81
82
83
84
# File 'lib/rrd-grapher/notifier/parsers/bindata_parser.rb', line 77

def get_value
  case
  when STR_FIELDS.include?(part_type) then  string_value
  when INT_FIELDS.include?(part_type) then  integer_value
  else
    vals.vals.map(&:val)
  end
end