Class: Mooncell::Application Private
- Inherits:
-
Object
- Object
- Mooncell::Application
- Defined in:
- lib/mooncell/application.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Mooncell Application
Defined Under Namespace
Modules: ClassMethods
Instance Attribute Summary collapse
- #pool ⇒ Object readonly private
- #router ⇒ Object readonly private
Class Method Summary collapse
- .inherited(base) ⇒ Object private
Instance Method Summary collapse
-
#call ⇒ Object
private
Run application.
-
#configuration ⇒ Mooncell::ApplicationConfiguration
private
Return the application configuration.
-
#initialize ⇒ Application
constructor
private
Create application instance.
Constructor Details
#initialize ⇒ Application
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Create application instance
71 72 73 74 75 76 77 |
# File 'lib/mooncell/application.rb', line 71 def initialize @pool = ConnectionPool.new @router = Router.new(self) # TODO: Add support to reload router setup_router end |
Instance Attribute Details
#pool ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
65 66 67 |
# File 'lib/mooncell/application.rb', line 65 def pool @pool end |
#router ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
65 66 67 |
# File 'lib/mooncell/application.rb', line 65 def router @router end |
Class Method Details
.inherited(base) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
14 15 16 17 |
# File 'lib/mooncell/application.rb', line 14 def self.inherited(base) super base.extend ClassMethods end |
Instance Method Details
#call ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Run application
83 84 85 86 |
# File 'lib/mooncell/application.rb', line 83 def call(*) protocol = Protocol.get(configuration.protocol) protocol.new(self).start end |
#configuration ⇒ Mooncell::ApplicationConfiguration
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return the application configuration
96 97 98 |
# File 'lib/mooncell/application.rb', line 96 def configuration self.class.configuration end |