Class: JSONFormatter

Inherits:
ArrayFormatter show all
Defined in:
lib/teuton/report/formatter/default/json.rb

Instance Attribute Summary

Attributes inherited from BaseFormatter

#ext

Instance Method Summary collapse

Methods inherited from ArrayFormatter

#build_data

Methods inherited from BaseFormatter

#deinit, #init, #trim, #w

Constructor Details

#initialize(report) ⇒ JSONFormatter

Returns a new instance of JSONFormatter.



6
7
8
9
# File 'lib/teuton/report/formatter/default/json.rb', line 6

def initialize(report)
  super
  @ext = "json"
end

Instance Method Details

#process(options = {}) ⇒ Object



11
12
13
14
15
# File 'lib/teuton/report/formatter/default/json.rb', line 11

def process(options = {})
  build_data(options)
  w @data.to_json # Write data into ouput file
  deinit
end