class Hash

Public Instance Methods

method_missing(symbol, *args) click to toggle source

If a method is missing it is interpreted as the key of the hash. If the method has an argument (for example by “method=”), the key called “method” is set to the respective argument.

# File lib/transmission-rss/hash.rb, line 5
def method_missing(symbol, *args)
  if args.size == 0
    self[symbol.to_s]
  else
    self[symbol.to_s.slice 0..-2] = args.first
  end
end