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



211
212
213
# File 'lib/canon/comparison/match_options.rb', line 211

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

.get_profile_options(profile) ⇒ Object

Delegate to JsonResolver



196
197
198
# File 'lib/canon/comparison/match_options.rb', line 196

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



203
204
205
# File 'lib/canon/comparison/match_options.rb', line 203

def match_dimensions
  MatchOptions::JsonResolver.match_dimensions
end

.resolve(**kwargs) ⇒ Object

Delegate to JsonResolver



191
192
193
# File 'lib/canon/comparison/match_options.rb', line 191

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