Class: Falcon::Configuration::Loader
- Inherits:
-
Async::Service::Loader
- Object
- Async::Service::Loader
- Falcon::Configuration::Loader
- Defined in:
- lib/falcon/configuration.rb
Overview
The domain specific language for loading configuration files.
Instance Method Summary collapse
-
#host(name, *parents, &block) ⇒ Object
deprecated
Deprecated.
Use ‘service` and `include Falcon::Environment::Server` instead.
-
#load(*features) ⇒ Object
deprecated
Deprecated.
Use ‘require` instead.
-
#proxy(name, *parents, &block) ⇒ Object
deprecated
Deprecated.
Use ‘service` and `include Falcon::Environment::Proxy` instead.
-
#rack(name, *parents, &block) ⇒ Object
deprecated
Deprecated.
Use ‘service` and `include Falcon::Environment::Rack` instead.
-
#supervisor(&block) ⇒ Object
deprecated
Deprecated.
Use ‘service` and `include Falcon::Environment::Supervisor` instead.
Instance Method Details
#host(name, *parents, &block) ⇒ Object
Use ‘service` and `include Falcon::Environment::Server` instead.
Define a host with the specified name. Adds ‘root` and `authority` keys.
55 56 57 58 59 |
# File 'lib/falcon/configuration.rb', line 55 def host(name, *parents, &block) @configuration.add( merge(*parents, name: name, root: @root, authority: name, &block) ) end |
#load(*features) ⇒ Object
Use ‘require` instead.
Load specific features into the current configuration.
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/falcon/configuration.rb', line 40 def load(*features) features.each do |feature| case feature when Symbol require File.join(__dir__, "environment", "#{feature}.rb") else raise LoadError, "Unsure about how to load #{feature}!" end end end |
#proxy(name, *parents, &block) ⇒ Object
Use ‘service` and `include Falcon::Environment::Proxy` instead.
Define a proxy with the specified name. Adds ‘root` and `authority` keys.
65 66 67 68 69 |
# File 'lib/falcon/configuration.rb', line 65 def proxy(name, *parents, &block) @configuration.add( merge(:proxy, *parents, name: name, root: @root, authority: name, &block) ) end |
#rack(name, *parents, &block) ⇒ Object
Use ‘service` and `include Falcon::Environment::Rack` instead.
Define a rack application with the specified name. Adds ‘root` and `authority` keys.
75 76 77 78 79 |
# File 'lib/falcon/configuration.rb', line 75 def rack(name, *parents, &block) @configuration.add( merge(:rack, *parents, name: name, root: @root, authority: name, &block) ) end |
#supervisor(&block) ⇒ Object
Use ‘service` and `include Falcon::Environment::Supervisor` instead.
Define a supervisor instance
83 84 85 86 87 88 89 |
# File 'lib/falcon/configuration.rb', line 83 def supervisor(&block) name = File.join(@root, "supervisor") @configuration.add( merge(:supervisor, name: name, root: @root, &block) ) end |