Sha256: 3c1b3c0e289791d58ed05216e0462480e0160767676a24bb85daf72db8734a9a
Contents?: true
Size: 707 Bytes
Versions: 1
Compression:
Stored size: 707 Bytes
Contents
module Feeder class Configuration attr_accessor :scopes attr_accessor :observables def initialize @scopes = [ proc { order created_at: :desc } ] @observables = {} end def add_observable(observable) warn "[DEPRECATION] Feeder::Configuration.add_observable is deprecated. Please use Feeder::Configuration.observe instead." observe observable end # Add an observable. # # observable - A model to observe. # options - A Hash of options: # :if - A lambda returning a boolean whether to create a feed item. def observe(observable, options = {}) @observables[observable] = options end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
feeder-0.5.1 | lib/feeder/configuration.rb |