Class: Brine::Selecting::Traversal
- Inherits:
-
Object
- Object
- Brine::Selecting::Traversal
- Defined in:
- lib/brine/selecting.rb
Overview
Capture a path for which the value will be retrieved from a root.
Instance Method Summary collapse
-
#initialize(path, is_plural) ⇒ Traversal
constructor
Return a traversal for the provided path.
-
#visit(root) ⇒ Object
Return values out of the provided root based on the traversal definition.
Constructor Details
#initialize(path, is_plural) ⇒ Traversal
Return a traversal for the provided path.
163 164 165 166 |
# File 'lib/brine/selecting.rb', line 163 def initialize(path, is_plural) @path = path @message = is_plural ? :on : :first end |