Sha256: 2bcc97b92d4532c254eb6d9a616162042529ba74bd49037346da738903293390

Contents?: true

Size: 775 Bytes

Versions: 17

Compression:

Stored size: 775 Bytes

Contents

# frozen_string_literal: true

module Cmdlet
  # Register this configuration access extension for Cmdlet configuration
  module CmdletConfigurationExtension
    def cmdlet
      return @cmdlet if defined? @cmdlet

      @cmdlet = CmdletConfiguration.new
    end
  end

  # Structure for storing Cmdlet configuration
  class CmdletConfiguration
    include KLog::Logging

    attr_accessor :tokenizer
    attr_accessor :padl_count
    attr_accessor :padl_char
    attr_accessor :padr_count
    attr_accessor :padr_char

    def initialize
      @tokenizer = Cmdlet::StringTokenizer.new
      @padr_count = 30
      @padr_char = ' '
      @padl_count = 30
      @padl_char = ' '
    end
  end
end

KConfig::Configuration.register(:cmdlet, Cmdlet::CmdletConfigurationExtension)

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
cmdlet-0.9.0 lib/cmdlet/configuration.rb
cmdlet-0.8.0 lib/cmdlet/configuration.rb
cmdlet-0.7.1 lib/cmdlet/configuration.rb
cmdlet-0.7.0 lib/cmdlet/configuration.rb
cmdlet-0.6.2 lib/cmdlet/configuration.rb
cmdlet-0.6.1 lib/cmdlet/configuration.rb
cmdlet-0.6.0 lib/cmdlet/configuration.rb
cmdlet-0.5.0 lib/cmdlet/configuration.rb
cmdlet-0.4.2 lib/cmdlet/configuration.rb
cmdlet-0.4.1 lib/cmdlet/configuration.rb
cmdlet-0.4.0 lib/cmdlet/configuration.rb
cmdlet-0.3.0 lib/cmdlet/configuration.rb
cmdlet-0.2.1 lib/cmdlet/configuration.rb
cmdlet-0.2.0 lib/cmdlet/configuration.rb
cmdlet-0.1.2 lib/cmdlet/configuration.rb
cmdlet-0.0.7 lib/cmdlet/configuration.rb
cmdlet-0.0.6 lib/cmdlet/configuration.rb