Class: MediaTypes::Scheme::ValidationOptions
- Inherits:
-
Object
- Object
- MediaTypes::Scheme::ValidationOptions
- Defined in:
- lib/media_types/scheme/validation_options.rb
Instance Attribute Summary collapse
-
#backtrace ⇒ Object
Returns the value of attribute backtrace.
-
#exhaustive ⇒ Object
Returns the value of attribute exhaustive.
-
#strict ⇒ Object
Returns the value of attribute strict.
Instance Method Summary collapse
- #exhaustive! ⇒ Object
-
#initialize(exhaustive: true, strict: true, backtrace: []) ⇒ ValidationOptions
constructor
A new instance of ValidationOptions.
- #inspect ⇒ Object
- #trace(*traces) ⇒ Object
- #with_backtrace(backtrace) ⇒ Object
Constructor Details
#initialize(exhaustive: true, strict: true, backtrace: []) ⇒ ValidationOptions
8 9 10 11 12 |
# File 'lib/media_types/scheme/validation_options.rb', line 8 def initialize(exhaustive: true, strict: true, backtrace: []) self.exhaustive = exhaustive self.strict = strict self.backtrace = backtrace end |
Instance Attribute Details
#backtrace ⇒ Object
Returns the value of attribute backtrace.
6 7 8 |
# File 'lib/media_types/scheme/validation_options.rb', line 6 def backtrace @backtrace end |
#exhaustive ⇒ Object
Returns the value of attribute exhaustive.
6 7 8 |
# File 'lib/media_types/scheme/validation_options.rb', line 6 def exhaustive @exhaustive end |
#strict ⇒ Object
Returns the value of attribute strict.
6 7 8 |
# File 'lib/media_types/scheme/validation_options.rb', line 6 def strict @strict end |
Instance Method Details
#exhaustive! ⇒ Object
26 27 28 |
# File 'lib/media_types/scheme/validation_options.rb', line 26 def exhaustive! ValidationOptions.new(exhaustive: true, strict: strict, backtrace: backtrace) end |
#inspect ⇒ Object
14 15 16 |
# File 'lib/media_types/scheme/validation_options.rb', line 14 def inspect "backtrack: #{backtrace.inspect}, strict: #{strict.inspect}, exhaustive: #{exhaustive}" end |
#trace(*traces) ⇒ Object
22 23 24 |
# File 'lib/media_types/scheme/validation_options.rb', line 22 def trace(*traces) with_backtrace(backtrace.dup.concat(traces)) end |
#with_backtrace(backtrace) ⇒ Object
18 19 20 |
# File 'lib/media_types/scheme/validation_options.rb', line 18 def with_backtrace(backtrace) ValidationOptions.new(exhaustive: exhaustive, strict: strict, backtrace: backtrace) end |