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

+ (Object) stringify(object)



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

def stringify(object)
  object.to_s
end

Instance Method Details

- (Object) [](key)



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

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

- (Object) []=(key, value)



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

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

- (Boolean) key?(key)

Returns:

  • (Boolean)


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

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