Sha256: bf44312d5e493b5db566990167962180e4a5d7a9bec21fa89b202a0ceb4a3104

Contents?: true

Size: 1.23 KB

Versions: 1

Compression:

Stored size: 1.23 KB

Contents

# frozen_string_literal: true

require 'tamashii/server'
require 'tamashii/common'
require 'tamashii/hookable'
require 'tamashii/manager/version'

require 'tamashii/manager/subscription'
require 'tamashii/manager/config'
require 'tamashii/manager/client_manager'
require 'tamashii/manager/client'
require 'tamashii/manager/channel'
require 'tamashii/manager/channel_pool'
require 'tamashii/manager/authorization'
require 'tamashii/manager/authorizator'
require 'tamashii/manager/handler'
require 'tamashii/manager/error'
require 'tamashii/manager/server'

module Tamashii
  # :nodoc:
  module Manager
    def self.config(&block)
      return instance_exec(Config.instance, &block) if block_given?
      Config
    end

    def self.logger
      @logger ||= ::Logger.new(config.log_file)
    end

    def self.server
      @server ||= Tamashii::Manager::Server.new
    end
  end
end

# TODO: Use block mode to define resolver
# rubocop:disable Metrics/LineLength
Tamashii::Resolver.default_handler Tamashii::Manager::Handler::Broadcaster
Tamashii::Resolver.handle Tamashii::Type::AUTH_TOKEN, Tamashii::Manager::Authorization
# rubocop:enable Metrics/LineLength

Tamashii::Hook.after(:config) do |config|
  config.register(:manager, Tamashii::Manager.config)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tamashii-manager-0.3.0 lib/tamashii/manager.rb