Class: Streamer::Finder

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/streamer/finder.rb

Overview

Finder maintains a consistent interface for all of the fact_providers It allows the Stream to have a consistent finding pattern.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(provider = nil) ⇒ Finder

Returns a new instance of Finder.



9
10
11
12
# File 'lib/streamer/finder.rb', line 9

def initialize(provider = nil)
  return @fact_provider = provider if provider
  @fact_provider = Streamer::FactProviders::HashProvider.new
end

Instance Attribute Details

#fact_providerObject (readonly)

Returns the value of attribute fact_provider.



6
7
8
# File 'lib/streamer/finder.rb', line 6

def fact_provider
  @fact_provider
end