Class: Hash

Inherits:
Object show all
Defined in:
lib/trellis/utils.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#each_pair_except(*exceptions) ⇒ Object



157
158
159
# File 'lib/trellis/utils.rb', line 157

def each_pair_except(*exceptions)
  _each_pair_except(exceptions)
end

#exclude_keys(*exceptions) ⇒ Object



161
162
163
164
165
166
167
# File 'lib/trellis/utils.rb', line 161

def exclude_keys(*exceptions)
  result = Hash.new
  self._each_pair_except(exceptions) do |key, value|
    result[key] = value
  end
  result
end

#keys_to_symbolsObject



151
152
153
154
155
# File 'lib/trellis/utils.rb', line 151

def keys_to_symbols
  self.each_pair do |key, value| 
    self["#{key}".to_sym] = value if key
  end
end