Class: ActiveSupport::XMLConverter

Inherits:
Object
  • Object
show all
Defined in:
activesupport/lib/active_support/core_ext/hash/conversions.rb

Overview

:nodoc:

Defined Under Namespace

Classes: DisallowedType

Constant Summary collapse

DISALLOWED_TYPES =
%w(symbol yaml)

Instance Method Summary collapse

Constructor Details

#initialize(xml, disallowed_types = nil) ⇒ XMLConverter


150
151
152
153
# File 'activesupport/lib/active_support/core_ext/hash/conversions.rb', line 150

def initialize(xml, disallowed_types = nil)
  @xml = normalize_keys(XmlMini.parse(xml))
  @disallowed_types = disallowed_types || DISALLOWED_TYPES
end

Instance Method Details

#to_hObject


155
156
157
# File 'activesupport/lib/active_support/core_ext/hash/conversions.rb', line 155

def to_h
  deep_to_h(@xml)
end