Class: Kernel::Hash

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

Instance Method Summary collapse

Instance Method Details

#to_hObject



5
6
7
8
9
10
11
12
13
# File 'lib/awesome_print/ext/awesome_puppet.rb', line 5

def to_h
  hash = extra_hash_attributes.dup

  self.class.hash_attribute_names.each do |name|
    hash[name] = __send__(name)
  end

  hash
end