Module: Canon::Comparison::MatchOptions::Yaml

Defined in:
lib/canon/comparison/match_options.rb

Overview

YAML-specific matching options

Constant Summary collapse

MATCH_DIMENSIONS =

Matching dimensions for YAML (collectively exhaustive)

%i[
  text_content
  structural_whitespace
  key_order
  comments
].freeze
FORMAT_DEFAULTS =

Expose FORMAT_DEFAULTS from YamlResolver (for backward compatibility)

MatchOptions::YamlResolver.const_get(:FORMAT_DEFAULTS)
MATCH_PROFILES =

Expose MATCH_PROFILES from YamlResolver (for backward compatibility)

MatchOptions::YamlResolver.const_get(:MATCH_PROFILES)

Class Method Summary collapse

Class Method Details

.format_defaults(format) ⇒ Hash

Get format-specific default options

Parameters:

  • format (Symbol)

    Format type

Returns:

  • (Hash)

    Default options for the format



255
256
257
# File 'lib/canon/comparison/match_options.rb', line 255

def format_defaults(format)
  MatchOptions::YamlResolver.format_defaults(format)
end

.get_profile_options(profile) ⇒ Object

Delegate to YamlResolver



240
241
242
# File 'lib/canon/comparison/match_options.rb', line 240

def get_profile_options(profile)
  MatchOptions::YamlResolver.get_profile_options(profile)
end

.match_dimensionsArray<Symbol>

Get valid match dimensions for YAML

Returns:

  • (Array<Symbol>)

    Valid dimensions



247
248
249
# File 'lib/canon/comparison/match_options.rb', line 247

def match_dimensions
  MatchOptions::YamlResolver.match_dimensions
end

.resolve(**kwargs) ⇒ Object

Delegate to YamlResolver



235
236
237
# File 'lib/canon/comparison/match_options.rb', line 235

def resolve(**kwargs)
  MatchOptions::YamlResolver.resolve(**kwargs)
end