Class: Canon::Config::FormatConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/canon/config.rb

Overview

Format-specific configuration Each format (XML, HTML, JSON, YAML) has its own instance

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(format) ⇒ FormatConfig

Returns a new instance of FormatConfig.



97
98
99
100
101
102
# File 'lib/canon/config.rb', line 97

def initialize(format)
  @format = format
  @match = MatchConfig.new(format)
  @diff = DiffConfig.new(format)
  @preprocessing = nil
end

Instance Attribute Details

#diffObject (readonly)

Returns the value of attribute diff.



94
95
96
# File 'lib/canon/config.rb', line 94

def diff
  @diff
end

#formatObject (readonly)

Returns the value of attribute format.



94
95
96
# File 'lib/canon/config.rb', line 94

def format
  @format
end

#matchObject (readonly)

Returns the value of attribute match.



94
95
96
# File 'lib/canon/config.rb', line 94

def match
  @match
end

#preprocessingObject

Returns the value of attribute preprocessing.



95
96
97
# File 'lib/canon/config.rb', line 95

def preprocessing
  @preprocessing
end

Instance Method Details

#reset!Object



104
105
106
107
108
# File 'lib/canon/config.rb', line 104

def reset!
  @match.reset!
  @diff.reset!
  @preprocessing = nil
end