Class: Tailor::Formatters::Yaml

Inherits:
Tailor::Formatter show all
Defined in:
lib/tailor/formatters/yaml.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Tailor::Formatter

#file_report, #problem_levels, #problems_at_level

Constructor Details

#initializeYaml

Returns a new instance of Yaml.



10
11
12
13
# File 'lib/tailor/formatters/yaml.rb', line 10

def initialize
  @accepts_output_file = true
  super
end

Instance Attribute Details

#accepts_output_fileObject (readonly)

Returns the value of attribute accepts_output_file.



8
9
10
# File 'lib/tailor/formatters/yaml.rb', line 8

def accepts_output_file
  @accepts_output_file
end

Instance Method Details

#summary_report(report) ⇒ Object

Prints the report on all of the files that just got checked.

Parameters:

  • report (Hash)

    Values are filenames; keys are problems for each of those files.



19
20
21
# File 'lib/tailor/formatters/yaml.rb', line 19

def summary_report(report)
  build_hash(report).to_yaml
end