Sha256: 57d5a2972b5d36fa8422a605ef9a9b365b647ac10e7f20a0bcc98ea87abd0e09

Contents?: true

Size: 1.03 KB

Versions: 13

Compression:

Stored size: 1.03 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]
  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'
  }

  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

13 entries across 13 versions & 1 rubygems

Version Path
everyday-cli-utils-1.7.4 lib/everyday-cli-utils.rb
everyday-cli-utils-1.7.3 lib/everyday-cli-utils.rb
everyday-cli-utils-1.7.2 lib/everyday-cli-utils.rb
everyday-cli-utils-1.7.1 lib/everyday-cli-utils.rb
everyday-cli-utils-1.7.0 lib/everyday-cli-utils.rb
everyday-cli-utils-1.6.0 lib/everyday-cli-utils.rb
everyday-cli-utils-1.5.2 lib/everyday-cli-utils.rb
everyday-cli-utils-1.5.1 lib/everyday-cli-utils.rb
everyday-cli-utils-1.5.0 lib/everyday-cli-utils.rb
everyday-cli-utils-1.4.0 lib/everyday-cli-utils.rb
everyday-cli-utils-1.3.0 lib/everyday-cli-utils.rb
everyday-cli-utils-1.2.0 lib/everyday-cli-utils.rb
everyday-cli-utils-1.1.0 lib/everyday-cli-utils.rb