Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/henshin/ext.rb

Direct Known Subclasses

Henshin::Archive

Instance Method Summary collapse

Instance Method Details

#to_optionsObject

Converts string hash keys to symbol keys

See Also:



37
38
39
40
41
42
# File 'lib/henshin/ext.rb', line 37

def to_options
  inject({}) do |options, (key, value)|
    options[(key.to_sym rescue key) || key] = value
    options
  end
end