module Refried

Refried core API methods

based in part on the design of backburner (https://github.com/nesquena/backburner MIT license)

Public Class Methods

configuration() click to toggle source

Returns the singleton class’s configuration object

@return [Configuration] the current configuration object

# File lib/refried.rb, line 31
def configuration
  @configuration ||= Configuration.new
end
configure(opts = {}) { |configuration| ... } click to toggle source

Allows the user to set configuration options

by yielding the configuration block

@param opts [Hash] an optional hash of options, supported options are ‘reset: true` @param block [Block] an optional configuration block @return [Configuration] the current configuration object

# File lib/refried.rb, line 20
def configure(opts = {}, &block)
  if opts.has_key?(:reset) && opts[:reset]
    @configuration = nil
  end
  yield(configuration) if block_given?
  configuration
end
jobs() click to toggle source

Returns the Beaneater::Jobs object, which exposes methods the allow finding jobs

@return [Beaneater::Jobs] the object for finding jobs

# File lib/refried.rb, line 45
def jobs
  @jobs ||= Jobs.new
end
tubes() click to toggle source

Returns the Beaneater::Tubes object, which is the collection of all the Beaneater Tube objects

@return [Beaneater::Tubes] the collection of Beaneater Tubes

# File lib/refried.rb, line 38
def tubes
  @tubes ||= Tubes.new
end