Class: Test::Unit::Attribute::StringifyKeyHash

Inherits:
Hash
  • Object
show all
Defined in:
lib/test/unit/attribute.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.stringify(object) ⇒ Object



6
7
8
# File 'lib/test/unit/attribute.rb', line 6

def stringify(object)
  object.to_s
end

Instance Method Details

#[](key) ⇒ Object



15
16
17
# File 'lib/test/unit/attribute.rb', line 15

def [](key)
  super(self.class.stringify(key))
end

#[]=(key, value) ⇒ Object



19
20
21
# File 'lib/test/unit/attribute.rb', line 19

def []=(key, value)
  super(self.class.stringify(key), value)
end

#key?(key) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/test/unit/attribute.rb', line 11

def key?(key)
  super(self.class.stringify(key))
end