class Alephant::Support::JsonPathLookup
Attributes
path[R]
Public Class Methods
new(path)
click to toggle source
# File lib/alephant/support/jsonpath_lookup.rb, line 8 def initialize(path) @path = path @jsonpath = JsonPath.new(path) end
Public Instance Methods
lookup(msg)
click to toggle source
# File lib/alephant/support/jsonpath_lookup.rb, line 13 def lookup(msg) @jsonpath.on(JSON.parse(msg)).first end