Module: Canon::Comparison::MatchOptions::Json

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

Overview

JSON-specific matching options

Constant Summary collapse

MATCH_DIMENSIONS =

Matching dimensions for JSON (collectively exhaustive)

%i[
  text_content
  structural_whitespace
  key_order
].freeze
FORMAT_DEFAULTS =

Expose FORMAT_DEFAULTS from JsonResolver (for backward compatibility)

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

Expose MATCH_PROFILES from JsonResolver (for backward compatibility)

MatchOptions::JsonResolver.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



208
209
210
# File 'lib/canon/comparison/match_options.rb', line 208

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

.get_profile_options(profile) ⇒ Object

Delegate to JsonResolver



193
194
195
# File 'lib/canon/comparison/match_options.rb', line 193

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

.match_dimensionsArray<Symbol>

Get valid match dimensions for JSON

Returns:

  • (Array<Symbol>)

    Valid dimensions



200
201
202
# File 'lib/canon/comparison/match_options.rb', line 200

def match_dimensions
  MatchOptions::JsonResolver.match_dimensions
end

.resolve(**kwargs) ⇒ Object

Delegate to JsonResolver



188
189
190
# File 'lib/canon/comparison/match_options.rb', line 188

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