Class: JsonPath::Wrapper
- Inherits:
-
Object
- Object
- JsonPath::Wrapper
- Defined in:
- lib/jsonpath/wrapper.rb
Instance Attribute Summary collapse
-
#object ⇒ Object
Returns the value of attribute object.
Instance Method Summary collapse
-
#initialize(object) ⇒ Wrapper
constructor
A new instance of Wrapper.
- #path(expression) ⇒ Object
Constructor Details
#initialize(object) ⇒ Wrapper
Returns a new instance of Wrapper.
5 6 7 |
# File 'lib/jsonpath/wrapper.rb', line 5 def initialize(object) @object = object end |
Instance Attribute Details
#object ⇒ Object
Returns the value of attribute object.
3 4 5 |
# File 'lib/jsonpath/wrapper.rb', line 3 def object @object end |
Instance Method Details
#path(expression) ⇒ Object
9 10 11 |
# File 'lib/jsonpath/wrapper.rb', line 9 def path(expression) @expression = Expression.new(expression, @object) end |