class Feeder::Configuration

Attributes

observables[RW]
scopes[RW]

Public Class Methods

new() click to toggle source
# File lib/feeder/configuration.rb, line 6
def initialize
  @scopes = [
    proc { order created_at: :desc }
  ]

  @observables = {}
end

Public Instance Methods

add_observable(observable) click to toggle source
# File lib/feeder/configuration.rb, line 14
def add_observable(observable)
  warn "[DEPRECATION] Feeder::Configuration.add_observable is deprecated. Please use Feeder::Configuration.observe instead."

  observe observable
end
observe(observable, options = {}) click to toggle source

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.
# File lib/feeder/configuration.rb, line 25
def observe(observable, options = {})
  @observables[observable] = options
end