Module: Dry::Types::Options
- Included in:
- Definition, Sum
- Defined in:
- lib/dry/types/options.rb
Instance Attribute Summary collapse
-
#meta(data = nil) ⇒ Object
readonly
Returns the value of attribute meta.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
Instance Attribute Details
#meta(data = nil) ⇒ Object (readonly)
Returns the value of attribute meta.
6 7 8 |
# File 'lib/dry/types/options.rb', line 6 def @meta end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/dry/types/options.rb', line 4 def @options end |
Instance Method Details
#initialize(*args, **options) ⇒ Object
8 9 10 11 12 |
# File 'lib/dry/types/options.rb', line 8 def initialize(*args, ** ) @__args__ = args @options = @meta = .fetch(:meta, {}) end |
#with(new_options) ⇒ Object
14 15 16 |
# File 'lib/dry/types/options.rb', line 14 def with() self.class.new(*@__args__, .merge()) end |