Class: Canon::Comparison::ResolvedMatchOptions
- Inherits:
-
Object
- Object
- Canon::Comparison::ResolvedMatchOptions
- Defined in:
- lib/canon/comparison/match_options.rb
Overview
Wrapper class for resolved match options Provides convenient methods for accessing behaviors by dimension
Instance Attribute Summary collapse
-
#compare_profile ⇒ Object
readonly
Returns the value of attribute compare_profile.
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#behavior_for(dimension) ⇒ Symbol
Get the behavior for a specific dimension.
-
#initialize(options, format:, compare_profile: nil) ⇒ ResolvedMatchOptions
constructor
A new instance of ResolvedMatchOptions.
-
#preprocessing ⇒ Symbol
Get the preprocessing option.
- #to_h ⇒ Object
Constructor Details
#initialize(options, format:, compare_profile: nil) ⇒ ResolvedMatchOptions
Returns a new instance of ResolvedMatchOptions.
20 21 22 23 24 |
# File 'lib/canon/comparison/match_options.rb', line 20 def initialize(, format:, compare_profile: nil) @options = @format = format @compare_profile = compare_profile end |
Instance Attribute Details
#compare_profile ⇒ Object (readonly)
Returns the value of attribute compare_profile.
18 19 20 |
# File 'lib/canon/comparison/match_options.rb', line 18 def compare_profile @compare_profile end |
#format ⇒ Object (readonly)
Returns the value of attribute format.
18 19 20 |
# File 'lib/canon/comparison/match_options.rb', line 18 def format @format end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
18 19 20 |
# File 'lib/canon/comparison/match_options.rb', line 18 def @options end |
Instance Method Details
#behavior_for(dimension) ⇒ Symbol
Get the behavior for a specific dimension
29 30 31 |
# File 'lib/canon/comparison/match_options.rb', line 29 def behavior_for(dimension) @options[dimension] end |
#preprocessing ⇒ Symbol
Get the preprocessing option
35 36 37 |
# File 'lib/canon/comparison/match_options.rb', line 35 def preprocessing @options[:preprocessing] end |
#to_h ⇒ Object
39 40 41 |
# File 'lib/canon/comparison/match_options.rb', line 39 def to_h @options.dup end |