Class: ActiveProjection::Server
- Inherits:
-
Object
- Object
- ActiveProjection::Server
- Defined in:
- lib/active_projection/server.rb
Instance Attribute Summary collapse
- #options ⇒ Object readonly
Class Method Summary collapse
Instance Method Summary collapse
- #config_file ⇒ Object
- #env ⇒ Object
-
#initialize(new_options = nil) ⇒ Server
constructor
A new instance of Server.
- #rails_config_file ⇒ Object
- #run ⇒ Object
Constructor Details
#initialize(new_options = nil) ⇒ Server
Returns a new instance of Server.
10 11 12 |
# File 'lib/active_projection/server.rb', line 10 def initialize( = nil) self. = .deep_symbolize_keys! unless .nil? end |
Instance Attribute Details
#options ⇒ Object
22 23 24 |
# File 'lib/active_projection/server.rb', line 22 def ||= (ARGV) end |
Class Method Details
.run(options = nil) ⇒ Object
6 7 8 |
# File 'lib/active_projection/server.rb', line 6 def self.run( = nil) self.new().run end |
Instance Method Details
#config_file ⇒ Object
30 31 32 |
# File 'lib/active_projection/server.rb', line 30 def config_file self.class.config_file ||= File.('config/disco.yml', base_path) end |
#env ⇒ Object
18 19 20 |
# File 'lib/active_projection/server.rb', line 18 def env @env = ENV['PROJECTION_ENV'] || ENV['RAILS_ENV'] || ENV['RACK_ENV'] || 'development' end |
#rails_config_file ⇒ Object
34 35 36 |
# File 'lib/active_projection/server.rb', line 34 def rails_config_file self.class.rails_config_file ||= File.('config/database.yml', base_path) end |
#run ⇒ Object
14 15 16 |
# File 'lib/active_projection/server.rb', line 14 def run EventClient.start end |