Class: Expri::Dumper

Inherits:
Object
  • Object
show all
Defined in:
lib/expri/dumper.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Dumper

Returns a new instance of Dumper.



3
4
5
# File 'lib/expri/dumper.rb', line 3

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

Instance Method Details

#runObject



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/expri/dumper.rb', line 7

def run
  str = ""
  str << header
  metrics = Metric.list
  metrics.each do |metric|
    metric = Metric.new(metric, {}, @options)
    metric.get
    str << dump_metric(metric)
  end
  str << footer
end