Module: Mooncell
- Defined in:
- lib/mooncell.rb,
lib/mooncell/cli.rb,
lib/mooncell/env.rb,
lib/mooncell/entity.rb,
lib/mooncell/loader.rb,
lib/mooncell/router.rb,
lib/mooncell/command.rb,
lib/mooncell/respond.rb,
lib/mooncell/version.rb,
lib/mooncell/protocol.rb,
lib/mooncell/connection.rb,
lib/mooncell/application.rb,
lib/mooncell/environment.rb,
lib/mooncell/cli/commands.rb,
lib/mooncell/configuration.rb,
lib/mooncell/connection_pool.rb,
lib/mooncell/cli/commands/base.rb,
lib/mooncell/protocol/registry.rb,
lib/mooncell/protocol/websocket.rb,
lib/mooncell/cli/commands/server.rb,
lib/mooncell/cli/commands/console.rb,
lib/mooncell/cli/commands/version.rb,
lib/mooncell/cli/commands/registry.rb,
lib/mooncell/application_configuration.rb,
lib/mooncell/protocol/websocket/server.rb
Overview
A online game server framework for Ruby
Defined Under Namespace
Modules: Command, Protocol, Respond Classes: Application, ApplicationConfiguration, CLI, Configuration, Connection, ConnectionPool, Entity, Env, Environment, Loader, Router
Constant Summary collapse
- VERSION =
'0.1.0'
Class Method Summary collapse
-
.code_reloading? ⇒ TrueClass, FalseClass
private
Check if enable code reloading.
-
.configuration ⇒ Mooncell::Configuration
private
Mooncell Configuration.
-
.configure(&block) ⇒ Object
Configure the Mooncell.
-
.env ⇒ String
Return current environment.
-
.environment ⇒ Mooncell::Environment
private
Current environment.
-
.root ⇒ Object
Return application root.
Class Method Details
.code_reloading? ⇒ TrueClass, FalseClass
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.
Check if enable code reloading
99 100 101 |
# File 'lib/mooncell.rb', line 99 def self.code_reloading? environment.code_reloading? end |
.configuration ⇒ Mooncell::Configuration
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.
Mooncell Configuration
75 76 77 78 79 80 81 |
# File 'lib/mooncell.rb', line 75 def self.configuration @_mutex.synchronize do raise 'Mooncell not configured' unless defined?(@_configuration) @_configuration end end |
.configure(&block) ⇒ Object
Configure the Mooncell
61 62 63 64 65 |
# File 'lib/mooncell.rb', line 61 def self.configure(&block) @_mutex.synchronize do @_configuration = Mooncell::Configuration.new(&block) end end |
.env ⇒ String
Return current environment
36 37 38 |
# File 'lib/mooncell.rb', line 36 def self.env environment.environment end |
.environment ⇒ Mooncell::Environment
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.
Current environment
89 90 91 |
# File 'lib/mooncell.rb', line 89 def self.environment @environment ||= Environment.new end |
.root ⇒ Object
Return application root
43 44 45 |
# File 'lib/mooncell.rb', line 43 def self.root environment.root end |