Class: Naksh::GConfStyleHash

Inherits:
Hash
  • Object
show all
Defined in:
lib/naksh/configuration/hash.rb

Instance Method Summary collapse

Instance Method Details

#[]=(key, value) ⇒ Object

Raises:

  • (TypeError)


23
24
25
26
27
# File 'lib/naksh/configuration/hash.rb', line 23

def []= key,value
  raise TypeError,'configuration keys can only be strings' unless key.class==String
  raise ArgumentError,'keys must start with `/\'' unless key.match(/\A\//)
  super key,value
end