Class: AppInitializer
- Inherits:
-
RubyPitaya::InitializerBase
- Object
- RubyPitaya::InitializerBase
- AppInitializer
- Defined in:
- lib/rubypitaya/app-template/app/app_initializer.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#run(initializer_content) ⇒ Object
method: run parameter: initializer_content attributes: - services - link: gitlab.com/LucianoPC/ruby-pitaya/-/blob/master/lib/rubypitaya/core/service_holder.rb.
Class Method Details
.path ⇒ Object
50 51 52 |
# File 'lib/rubypitaya/app-template/app/app_initializer.rb', line 50 def self.path __FILE__ end |
Instance Method Details
#run(initializer_content) ⇒ Object
method: run parameter: initializer_content attributes:
- services
- link: https://gitlab.com/LucianoPC/ruby-pitaya/-/blob/master/lib/rubypitaya/core/service_holder.rb
- config
- class: RubyPitaya::Config
- link: https://gitlab.com/LucianoPC/ruby-pitaya/-/blob/master/lib/rubypitaya/core/config.rb
- methods:
- [](key)
- get config file by config path
- setup
- class: RubyPitaya::Setup
- link: https://gitlab.com/LucianoPC/ruby-pitaya/-/blob/master/lib/rubypitaya/core/setup.rb
- methods:
- [](key)
- get config file by config path
- log
- class: Logger
- link: https://ruby-doc.org/stdlib-2.6.4/libdoc/logger/rdoc/Logger.html
- methods:
- info
- log information
- handlers
- List of all handlers
services:
- redis
- link:
- https://github.com/redis/redis-rb/
- https://gitlab.com/LucianoPC/ruby-pitaya/-/blob/master/lib/rubypitaya/core/app/services/redis_service.rb
40 41 42 43 44 45 46 47 48 |
# File 'lib/rubypitaya/app-template/app/app_initializer.rb', line 40 def run(initializer_content) setup = initializer_content.setup services = initializer_content.services services.add(:redis, RubyPitaya::RedisService.new(setup)) playerBll = PlayerBLL.new PlayerHandler.objects.add(:bll, playerBll) end |