Sha256: b196dd5ee8a581ab736d1c5bae6b9c8c5a11623389a18a8b7c287832563191a4

Contents?: true

Size: 553 Bytes

Versions: 3

Compression:

Stored size: 553 Bytes

Contents

require 'tamashii/common'

module Tamashii
  module Manager
    class Config < Tamashii::Config
      AUTH_TYPES = [:none, :token]

      register :auth_type, :none
      register :log_file, STDOUT
      register :heartbeat_interval, 3

      def auth_type(type = nil)
        return self[:auth_type] if type.nil?
        return unless AUTH_TYPES.include?(type)
        self[:auth_type] = type
      end

      def log_level(level = nil)
        return Manager.logger.level if level.nil?
        Manager.logger.level = level
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tamashii-manager-0.1.7 lib/tamashii/manager/config.rb
tamashii-manager-0.1.5 lib/tamashii/manager/config.rb
tamashii-manager-0.1.4 lib/tamashii/manager/config.rb