class Utopia::Content::SymbolicHash
A hash which forces all keys to be symbols and fails with KeyError when strings are used.
Public Instance Methods
[](key)
click to toggle source
Calls superclass method
# File lib/utopia/content/markup.rb, line 34 def [] key raise KeyError.new("attribute #{key} is a string, prefer a symbol") if key.is_a? String super key.to_sym end
[]=(key, value)
click to toggle source
Calls superclass method
# File lib/utopia/content/markup.rb, line 39 def []= key, value super key.to_sym, value end
fetch(key, *arguments, &block)
click to toggle source
Calls superclass method
# File lib/utopia/content/markup.rb, line 43 def fetch(key, *arguments, &block) key = key.to_sym super end
include?(key)
click to toggle source
Calls superclass method
# File lib/utopia/content/markup.rb, line 49 def include? key key = key.to_sym super end