Class: Databox::Pipeline

Inherits:
Integration show all
Defined in:
lib/databox/integration.rb

Overview

TODO: Add support for icons TODO: Add support for changes

Direct Known Subclasses

Funnel

Instance Attribute Summary

Attributes inherited from Integration

#date, #list, #name, #set_item

Attributes inherited from Client

#token

Instance Method Summary collapse

Methods inherited from Integration

#initialize, #save

Methods inherited from Client

#handle, #initialize, #key, #logs, #push, #url, #validate

Constructor Details

This class inherits a constructor from Databox::Integration

Instance Method Details

#add(message, value) ⇒ Object



47
48
49
# File 'lib/databox/integration.rb', line 47

def add message, value
  @list.push [message, value]
end

#to_dataObject



51
52
53
54
55
56
# File 'lib/databox/integration.rb', line 51

def to_data
  [
    { key: "#{name}@labels", value: list.map(&:first)     },
    { key: "#{name}@values", value: list.map{|e| e[1] }   },
  ]
end