Skip to content

Instantly share code, notes, and snippets.

@nuke99
Created May 23, 2012 21:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nuke99/6c7d3e0e3dbdf781f93a to your computer and use it in GitHub Desktop.
Save nuke99/6c7d3e0e3dbdf781f93a to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
# HelpSet class collects command name , definition and type of the command
#
require 'singleton'
require 'pp'
class Store
def initialize
@info = {}
end
def self.set(command,type,discription)
pp command
@info[command] = {:disc=>discription,:type=>type}
puts "============================================="
end
def self.onit
return @info
end
end
class HelpSet
include Singleton
#attr_accessor :info
def set(command,type,discription)
#@info[command] = {:disc=>discription,:type=>type}
#pp @info
#puts "============================================="
Store::set(command,type,discription)
end
def onit
#return @info
return Store::onit
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment