Sha256: fbc98afcc3ef502b6a8be7c75937db299e4eb829b215ee165855532eff0b0d23

Contents?: true

Size: 1.42 KB

Versions: 19

Compression:

Stored size: 1.42 KB

Contents

require 'rubypitaya/core/app/services/redis_service'

class AppInitializer < RubyPitaya::InitializerBase

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

  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

  def self.path
    __FILE__
  end
end

Version data entries

19 entries across 15 versions & 1 rubygems

Version Path
rubypitaya-3.16.0 ./lib/rubypitaya/app-template/app/app_initializer.rb
rubypitaya-3.15.3 ./lib/rubypitaya/app-template/app/app_initializer.rb
rubypitaya-3.15.2 ./lib/rubypitaya/app-template/app/app_initializer.rb
rubypitaya-3.15.1 ./lib/rubypitaya/app-template/app/app_initializer.rb
rubypitaya-3.15.0 ./lib/rubypitaya/app-template/app/app_initializer.rb
rubypitaya-3.14.0 ./lib/rubypitaya/app-template/app/app_initializer.rb
rubypitaya-3.13.1 ./lib/rubypitaya/app-template/app/app_initializer.rb
rubypitaya-3.13.0 ./lib/rubypitaya/app-template/app/app_initializer.rb
rubypitaya-3.12.5 ./lib/rubypitaya/app-template/app/app_initializer.rb
rubypitaya-3.12.5 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rubypitaya-3.12.1/lib/rubypitaya/app-template/app/app_initializer.rb
rubypitaya-3.12.4 ./lib/rubypitaya/app-template/app/app_initializer.rb
rubypitaya-3.12.4 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rubypitaya-3.12.1/lib/rubypitaya/app-template/app/app_initializer.rb
rubypitaya-3.12.3 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rubypitaya-3.12.1/lib/rubypitaya/app-template/app/app_initializer.rb
rubypitaya-3.12.3 ./lib/rubypitaya/app-template/app/app_initializer.rb
rubypitaya-3.12.2 ./lib/rubypitaya/app-template/app/app_initializer.rb
rubypitaya-3.12.2 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rubypitaya-3.12.1/lib/rubypitaya/app-template/app/app_initializer.rb
rubypitaya-3.12.1 ./lib/rubypitaya/app-template/app/app_initializer.rb
rubypitaya-3.12.0 ./lib/rubypitaya/app-template/app/app_initializer.rb
rubypitaya-3.11.0 ./lib/rubypitaya/app-template/app/app_initializer.rb