Class: Stockboy::Configuration
- Inherits:
-
Object
- Object
- Stockboy::Configuration
- Defined in:
- lib/stockboy/configuration.rb
Overview
Global Stockboy configuration options
Instance Attribute Summary collapse
-
#logger ⇒ Logger
Default logger.
-
#template_load_paths ⇒ Array<String>
Directories where Stockboy job template files can be found.
-
#tmp_dir ⇒ String
Path for storing tempfiles during processing.
Instance Method Summary collapse
-
#initialize { ... } ⇒ Configuration
constructor
Initialize a set of global configuration options.
Constructor Details
#initialize { ... } ⇒ Configuration
Initialize a set of global configuration options
34 35 36 37 38 39 |
# File 'lib/stockboy/configuration.rb', line 34 def initialize @template_load_paths = [] @logger = Logger.new(STDOUT) @tmp_dir = Dir.tmpdir yield self if block_given? end |
Instance Attribute Details
#logger ⇒ Logger
Default logger
28 29 30 |
# File 'lib/stockboy/configuration.rb', line 28 def logger @logger end |
#template_load_paths ⇒ Array<String>
Directories where Stockboy job template files can be found.
Needs to be configured with your own paths if running standalone. When running with Rails, includes config/stockboy_jobs
by default.
16 17 18 |
# File 'lib/stockboy/configuration.rb', line 16 def template_load_paths @template_load_paths end |
#tmp_dir ⇒ String
Path for storing tempfiles during processing
22 23 24 |
# File 'lib/stockboy/configuration.rb', line 22 def tmp_dir @tmp_dir end |