Sha256: 925eb95f4d7563e45f913b1955202096d217cf5d4bbcdbcf7be801041d68c8a3

Contents?: true

Size: 811 Bytes

Versions: 15

Compression:

Stored size: 811 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

      reset
    end

    def reset
      @padr_count = 30
      @padr_char = ' '
      @padl_count = 30
      @padl_char = ' '
    end
  end
end

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

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
cmdlet-0.14.0 lib/cmdlet/configuration.rb
cmdlet-0.13.2 lib/cmdlet/configuration.rb
cmdlet-0.13.1 lib/cmdlet/configuration.rb
cmdlet-0.13.0 lib/cmdlet/configuration.rb
cmdlet-0.12.5 lib/cmdlet/configuration.rb
cmdlet-0.12.4 lib/cmdlet/configuration.rb
cmdlet-0.12.3 lib/cmdlet/configuration.rb
cmdlet-0.12.2 lib/cmdlet/configuration.rb
cmdlet-0.12.1 lib/cmdlet/configuration.rb
cmdlet-0.12.0 lib/cmdlet/configuration.rb
cmdlet-0.11.0 lib/cmdlet/configuration.rb
cmdlet-0.10.1 lib/cmdlet/configuration.rb
cmdlet-0.10.0 lib/cmdlet/configuration.rb
cmdlet-0.9.2 lib/cmdlet/configuration.rb
cmdlet-0.9.1 lib/cmdlet/configuration.rb