Sha256: 267287f9b6728eebb415a5b705790e563f4fbc2ad482a77120718fcb61f944d3

Contents?: true

Size: 938 Bytes

Versions: 22

Compression:

Stored size: 938 Bytes

Contents

module SOPT
  class << self
    attr_writer :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

22 entries across 22 versions & 2 rubygems

Version Path
scout-essentials-1.6.5 lib/scout/simple_opt/accessor.rb
scout-essentials-1.6.4 lib/scout/simple_opt/accessor.rb
scout-essentials-1.6.3 lib/scout/simple_opt/accessor.rb
scout-essentials-1.6.2 lib/scout/simple_opt/accessor.rb
scout-essentials-1.6.1 lib/scout/simple_opt/accessor.rb
scout-essentials-1.6.0 lib/scout/simple_opt/accessor.rb
scout-essentials-1.3.1 lib/scout/simple_opt/accessor.rb
scout-essentials-1.3.0 lib/scout/simple_opt/accessor.rb
scout-essentials-1.2.0 lib/scout/simple_opt/accessor.rb
scout-essentials-1.1.1 lib/scout/simple_opt/accessor.rb
scout-essentials-1.1.0 lib/scout/simple_opt/accessor.rb
scout-essentials-1.0.0 lib/scout/simple_opt/accessor.rb
scout-gear-9.1.0 lib/scout/simple_opt/accessor.rb
scout-gear-9.0.0 lib/scout/simple_opt/accessor.rb
scout-gear-8.1.0 lib/scout/simple_opt/accessor.rb
scout-gear-8.0.0 lib/scout/simple_opt/accessor.rb
scout-gear-7.3.0 lib/scout/simple_opt/accessor.rb
scout-gear-7.2.0 lib/scout/simple_opt/accessor.rb
scout-gear-7.1.0 lib/scout/simple_opt/accessor.rb
scout-gear-6.0.0 lib/scout/simple_opt/accessor.rb