Module: DaemonObjects
- Defined in:
- lib/daemon_objects.rb,
lib/daemon_objects/loader.rb,
lib/daemon_objects/version.rb
Defined Under Namespace
Modules: Amqp, AmqpSupport, Logging Classes: Base, ConsumerBase
Constant Summary collapse
- ROOT =
File.join(File.dirname(__FILE__))
- DAEMON_FILE_ENDING =
"_daemon.rb"
- VERSION =
"0.2.2"
Class Attribute Summary collapse
-
.daemon_path ⇒ Object
Returns the value of attribute daemon_path.
-
.environment ⇒ Object
Returns the value of attribute environment.
Class Method Summary collapse
Class Attribute Details
.daemon_path ⇒ Object
Returns the value of attribute daemon_path.
7 8 9 |
# File 'lib/daemon_objects/loader.rb', line 7 def daemon_path @daemon_path end |
.environment ⇒ Object
Returns the value of attribute environment.
9 10 11 |
# File 'lib/daemon_objects.rb', line 9 def environment @environment end |
Class Method Details
.daemons ⇒ Object
13 14 15 |
# File 'lib/daemon_objects/loader.rb', line 13 def daemons @daemons ||= get_daemons end |
.get_daemon_name(path) ⇒ Object
17 18 19 20 |
# File 'lib/daemon_objects/loader.rb', line 17 def get_daemon_name(path) file = Pathname(path).basename.to_s file.gsub!(/#{DAEMON_FILE_ENDING}$/, "") end |
.initialize_environment ⇒ Object
11 12 13 |
# File 'lib/daemon_objects.rb', line 11 def initialize_environment @environment = (defined? Rails) ? Rails.env : (ENV["DAEMON_ENV"] || "development") end |