Module: MultiXML::Options Private
- Included in:
- MultiXML
- Defined in:
- lib/multi_xml/options.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Mixin providing configurable parse options
Supports static hashes or dynamic callables (procs/lambdas). Extended into MultiXML so callers configure process-wide defaults via parse_options=.
Constant Summary collapse
- EMPTY_OPTIONS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Frozen empty hash used as the zero-default for parse options.
{}.freeze
Instance Method Summary collapse
-
#parse_options ⇒ Hash
Get options for parse operations.
-
#parse_options=(options) ⇒ Hash, Proc
Set options for parse operations.
Instance Method Details
#parse_options ⇒ Hash
Get options for parse operations
When @parse_options is a callable (proc/lambda), it's invoked
with args as positional arguments — typically the call-site
options hash. When it's a plain hash, args is ignored.
35 36 37 |
# File 'lib/multi_xml/options.rb', line 35 def (*) (@parse_options, *) || EMPTY_OPTIONS end |
#parse_options=(options) ⇒ Hash, Proc
Set options for parse operations
20 21 22 |
# File 'lib/multi_xml/options.rb', line 20 def () @parse_options = end |