Skip to content

Instantly share code, notes, and snippets.

@abloom
Created May 18, 2009 18:02
Show Gist options
  • Save abloom/113644 to your computer and use it in GitHub Desktop.
Save abloom/113644 to your computer and use it in GitHub Desktop.
class LinkBar
def initialize
@bars = Hash.new
end
def register(linkbar_name, links)
@bars[linkbar_name] ||= []
@bars[linkbar_name].concat links
end
def query(linkbar_name)
return @bars[linkbar_name]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment