Class: JsonPath::Wrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/jsonpath/wrapper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#objectObject

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