Class: JsonPath::Path
- Inherits:
-
Object
- Object
- JsonPath::Path
- Defined in:
- lib/json_path/path.rb
Instance Attribute Summary collapse
-
#proc ⇒ Object
readonly
Returns the value of attribute proc.
-
#string ⇒ Object
readonly
Returns the value of attribute string.
Instance Method Summary collapse
- #apply(node) ⇒ Object
-
#initialize(json_path) ⇒ Path
constructor
A new instance of Path.
Constructor Details
Instance Attribute Details
#proc ⇒ Object (readonly)
Returns the value of attribute proc.
6 7 8 |
# File 'lib/json_path/path.rb', line 6 def proc @proc end |
#string ⇒ Object (readonly)
Returns the value of attribute string.
5 6 7 |
# File 'lib/json_path/path.rb', line 5 def string @string end |
Instance Method Details
#apply(node) ⇒ Object
18 19 20 |
# File 'lib/json_path/path.rb', line 18 def apply node proc.call node end |