Class: Barkdog::Exporter

Inherits:
Object
  • Object
show all
Defined in:
lib/barkdog/exporter.rb

Constant Summary collapse

EXCLUDE_KEYS =
%w(
  overall_state
  creator
  org_id
  multi
)

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dog, options = {}) ⇒ Exporter

of class methods



15
16
17
18
# File 'lib/barkdog/exporter.rb', line 15

def initialize(dog, options = {})
  @dog = dog
  @options = options
end

Class Method Details

.export(dog, opts = {}) ⇒ Object



10
11
12
# File 'lib/barkdog/exporter.rb', line 10

def export(dog, opts = {})
  self.new(dog, opts).export
end

Instance Method Details

#exportObject



20
21
22
23
# File 'lib/barkdog/exporter.rb', line 20

def export
  monitors = @dog.get_all_monitors[1]
  normalize(monitors)
end