Sha256: 52c8c9aaede305037c43cdab0a159ba1a480959eae6db323ef6eac484f807459

Contents?: true

Size: 236 Bytes

Versions: 6

Compression:

Stored size: 236 Bytes

Contents

# encoding: utf-8
# copyright: 2016, Chef Software Inc.
# author: Dominik Richter
# author: Christoph Hartmann

class Struct
  unless instance_methods.include? :to_h
    def to_h
      Hash[each_pair.to_a]
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
inspec-2.1.81 lib/inspec/polyfill.rb
inspec-2.1.21 lib/inspec/polyfill.rb
inspec-2.1.10 lib/inspec/polyfill.rb
inspec-2.0.32 lib/inspec/polyfill.rb
inspec-2.0.17 lib/inspec/polyfill.rb
inspec-1.51.15 lib/inspec/polyfill.rb