Sha256: e5b4d2d4fe807a77f3cd7225c2ca8ab73a59492c402b746aa9f41c55744b2b1d

Contents?: true

Size: 1.1 KB

Versions: 10

Compression:

Stored size: 1.1 KB

Contents

require_relative 'everyday-cli-utils/version'

module EverydayCliUtils
  AVAILABLE_MODULES  = [:ask, :format, :format_safe, :histogram, :histogram_safe, :kmeans, :kmeans_safe, :maputil, :maputil_safe, :option, :override]
  MODULE_TO_RELATIVE = {
      ask:            'everyday-cli-utils/ask',
      format:         'everyday-cli-utils/format',
      format_safe:    'everyday-cli-utils/safe/format',
      histogram:      'everyday-cli-utils/histogram',
      histogram_safe: 'everyday-cli-utils/safe/histogram',
      kmeans:         'everyday-cli-utils/kmeans',
      kmeans_safe:    'everyday-cli-utils/safe/kmeans',
      maputil:        'everyday-cli-utils/maputil',
      maputil_safe:   'everyday-cli-utils/safe/maputil',
      option:         'everyday-cli-utils/option',
      override:       'everyday-cli-utils/override',
  }

  def import(*names)
    EverydayCliUtils.import(*names)
  end

  def self.import(*names)
    names.each { |name|
      if MODULE_TO_RELATIVE.has_key?(name)
        require_relative MODULE_TO_RELATIVE[name]
      else
        raise "#{name.to_s} not found!"
      end
    }
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
everyday-cli-utils-1.8.7.2 lib/everyday-cli-utils.rb
everyday-cli-utils-1.8.7.1 lib/everyday-cli-utils.rb
everyday-cli-utils-1.8.7 lib/everyday-cli-utils.rb
everyday-cli-utils-1.8.6 lib/everyday-cli-utils.rb
everyday-cli-utils-1.8.5 lib/everyday-cli-utils.rb
everyday-cli-utils-1.8.4 lib/everyday-cli-utils.rb
everyday-cli-utils-1.8.3 lib/everyday-cli-utils.rb
everyday-cli-utils-1.8.2 lib/everyday-cli-utils.rb
everyday-cli-utils-1.8.1 lib/everyday-cli-utils.rb
everyday-cli-utils-1.8.0 lib/everyday-cli-utils.rb