class Bio::Ucsc::Schema::Variables

Public Class Methods

new() click to toggle source
# File lib/bio-ucsc/schema.rb, line 240
def initialize
  @var = Hash.new
end

Public Instance Methods

[](key) click to toggle source
# File lib/bio-ucsc/schema.rb, line 253
def [](key)
  if @var[key].nil?

  end

  return @var[key].map do |v|
    if v.start_with?("$")
      self[(v[1..-1])]
    else
      v
    end
  end
end
[]=(key, value) click to toggle source
# File lib/bio-ucsc/schema.rb, line 244
def []=(key, value)
  if value.respond_to?(:each)
    @var[key] = value            
  else
    @var[key] = [value]
  end
  @var[key]
end