Module: Dry::Types::Options Private
- Included in:
- Composition, Decorator, Nominal
- Defined in:
- lib/dry/types/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.
Common API for types with options
Instance Attribute Summary collapse
- #options ⇒ Hash readonly private
Instance Method Summary collapse
- #initialize(*args, **options) ⇒ Object private
- #with(**new_options) ⇒ Type private
Instance Attribute Details
#options ⇒ Hash (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
10 11 12 |
# File 'lib/dry/types/options.rb', line 10 def @options end |
Instance Method Details
#initialize(*args, **options) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
15 16 17 18 |
# File 'lib/dry/types/options.rb', line 15 def initialize(*args, **) @__args__ = args.freeze @options = .freeze end |
#with(**new_options) ⇒ Type
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
25 26 27 |
# File 'lib/dry/types/options.rb', line 25 def with(**) self.class.new(*@__args__, **, **) end |