Class: Dry::Schema::Message::Or::MultiPath::MessageArray Private
- Inherits:
-
Object
- Object
- Dry::Schema::Message::Or::MultiPath::MessageArray
- Defined in:
- lib/dry/schema/message/or/multi_path.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #_paths ⇒ Object private
-
#initialize(messages) ⇒ MessageArray
constructor
private
A new instance of MessageArray.
- #to_h ⇒ Object private
- #to_or(root) ⇒ Object private
Constructor Details
#initialize(messages) ⇒ MessageArray
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.
Returns a new instance of MessageArray.
14 15 16 |
# File 'lib/dry/schema/message/or/multi_path.rb', line 14 def initialize() @messages = .flatten end |
Instance Method Details
#_paths ⇒ 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.
19 20 21 |
# File 'lib/dry/schema/message/or/multi_path.rb', line 19 def _paths @messages.map(&:_path) end |
#to_h ⇒ 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.
29 30 31 |
# File 'lib/dry/schema/message/or/multi_path.rb', line 29 def to_h MessageSet.new(@messages).to_h end |