Sha256: b823c52ce78f8129ae4fb9197daf3996c8b6a9671310ee3058438c4ca5c8c5a1

Contents?: true

Size: 941 Bytes

Versions: 815

Compression:

Stored size: 941 Bytes

Contents

module SOPT
  class << self
    attr_accessor :inputs, :input_shortcuts, :input_types, :input_descriptions, :input_defaults
  end

  def self.all
    @all ||= {}
  end

  def self.shortcuts
    @shortcuts ||= {}
  end
  
  def self.inputs 
    @inputs ||= []
  end

  def self.input_shortcuts 
    @input_shortcuts ||= {}
  end

  def self.input_types 
    @input_types ||= {}
  end

  def self.input_descriptions 
    @input_descriptions ||= {}
  end

  def self.input_defaults 
    @input_defaults ||= {}
  end

  def self.reset
    @shortcuts = {}
    @all = {}
  end

  def self.delete_inputs(inputs)
    inputs.each do |input|
      input = input.to_s
      self.shortcuts.delete self.input_shortcuts.delete(input)
      self.inputs.delete input
      self.input_types.delete input
      self.input_defaults.delete input
      self.input_descriptions.delete input
    end
  end

  def self.usage
    puts SOPT.doc
    exit 0
  end
end

Version data entries

815 entries across 815 versions & 1 rubygems

Version Path
rbbt-util-5.33.18 lib/rbbt/util/simpleopt/accessor.rb
rbbt-util-5.33.17 lib/rbbt/util/simpleopt/accessor.rb
rbbt-util-5.33.16 lib/rbbt/util/simpleopt/accessor.rb
rbbt-util-5.33.15 lib/rbbt/util/simpleopt/accessor.rb
rbbt-util-5.33.14 lib/rbbt/util/simpleopt/accessor.rb
rbbt-util-5.33.13 lib/rbbt/util/simpleopt/accessor.rb
rbbt-util-5.33.12 lib/rbbt/util/simpleopt/accessor.rb
rbbt-util-5.33.11 lib/rbbt/util/simpleopt/accessor.rb
rbbt-util-5.33.9 lib/rbbt/util/simpleopt/accessor.rb
rbbt-util-5.33.8 lib/rbbt/util/simpleopt/accessor.rb
rbbt-util-5.33.7 lib/rbbt/util/simpleopt/accessor.rb
rbbt-util-5.33.6 lib/rbbt/util/simpleopt/accessor.rb
rbbt-util-5.33.5 lib/rbbt/util/simpleopt/accessor.rb
rbbt-util-5.33.4 lib/rbbt/util/simpleopt/accessor.rb
rbbt-util-5.33.3 lib/rbbt/util/simpleopt/accessor.rb
rbbt-util-5.33.2 lib/rbbt/util/simpleopt/accessor.rb
rbbt-util-5.33.1 lib/rbbt/util/simpleopt/accessor.rb
rbbt-util-5.33.0 lib/rbbt/util/simpleopt/accessor.rb
rbbt-util-5.32.30 lib/rbbt/util/simpleopt/accessor.rb
rbbt-util-5.32.28 lib/rbbt/util/simpleopt/accessor.rb