Class: Mooncell::Application Private

Inherits:
Object
  • Object
show all
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

Since:

  • 0.1.0

Defined Under Namespace

Modules: ClassMethods

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeApplication

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

Since:

  • 0.1.0



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

#poolObject (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.

Since:

  • 0.1.0



65
66
67
# File 'lib/mooncell/application.rb', line 65

def pool
  @pool
end

#routerObject (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.

Since:

  • 0.1.0



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.

Since:

  • 0.1.0



14
15
16
17
# File 'lib/mooncell/application.rb', line 14

def self.inherited(base)
  super
  base.extend ClassMethods
end

Instance Method Details

#callObject

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

Since:

  • 0.1.0



83
84
85
86
# File 'lib/mooncell/application.rb', line 83

def call(*)
  protocol = Protocol.get(configuration.protocol)
  protocol.new(self).start
end

#configurationMooncell::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

Returns:

See Also:

Since:

  • 0.1.0



96
97
98
# File 'lib/mooncell/application.rb', line 96

def configuration
  self.class.configuration
end