class Streamer::Functors::Lookup
Lookup
looks up a fact given a finder
Public Instance Methods
call()
click to toggle source
# File lib/streamer/functors/lookup.rb, line 5 def call finder = options.fetch(:finder) finder.find(lookup_key) end
lookup_key()
click to toggle source
# File lib/streamer/functors/lookup.rb, line 10 def lookup_key item_key = options.fetch(:terms)[0] options[:fact] = options.fetch(:fact).gsub('#', "#{item_key}.") end