Module: Refried
- Defined in:
- lib/refried.rb,
lib/refried/jobs.rb,
lib/refried/tube.rb,
lib/refried/puter.rb,
lib/refried/tubes.rb,
lib/refried/getter.rb,
lib/refried/configuration.rb
Overview
Refried core API methods
based in part on the design of backburner (https://github.com/nesquena/backburner MIT license)
Defined Under Namespace
Modules: Getter, Puter, Tube Classes: Configuration, Jobs, Tubes
Class Method Summary collapse
-
.configuration ⇒ Configuration
Returns the singleton class’s configuration object.
-
.configure(opts = {}, &block) {|configuration| ... } ⇒ Configuration
Allows the user to set configuration options by yielding the configuration block.
-
.jobs ⇒ Beaneater::Jobs
Returns the Beaneater::Jobs object, which exposes methods the allow finding jobs.
-
.tubes ⇒ Beaneater::Tubes
Returns the Beaneater::Tubes object, which is the collection of all the Beaneater Tube objects.
Class Method Details
.configuration ⇒ Configuration
Returns the singleton class’s configuration object
31 32 33 |
# File 'lib/refried.rb', line 31 def configuration @configuration ||= Configuration.new end |
.configure(opts = {}, &block) {|configuration| ... } ⇒ Configuration
Allows the user to set configuration options
by yielding the configuration block
20 21 22 23 24 25 26 |
# 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 |