Sha256: 9f2d80cf3c2ea2237e88a52694d4bbec6e25d96711efae04a5ba7afaad9adf76

Contents?: true

Size: 830 Bytes

Versions: 5

Compression:

Stored size: 830 Bytes

Contents

class BasicObject #:nodoc:
  instance_methods.each { |m| undef_method m unless m =~ /^__|instance_eval/ }
end unless defined?(BasicObject)
 
# 1.8.6 has mistyping of transitive in if statement
require "rexml/document"
module REXML #:nodoc:
  class Document < Element #:nodoc:
    def write( output=$stdout, indent=-1, transitive=false, ie_hack=false )
      if xml_decl.encoding != "UTF-8" && !output.kind_of?(Output)
        output = Output.new( output, xml_decl.encoding )
      end
      formatter = if indent > -1
          if transitive
            REXML::Formatters::Transitive.new( indent, ie_hack )
          else
            REXML::Formatters::Pretty.new( indent, ie_hack )
          end
        else
          REXML::Formatters::Default.new( ie_hack )
        end
      formatter.write( self, output )
    end
  end
end

Version data entries

5 entries across 5 versions & 4 rubygems

Version Path
jcinnamond-httparty-0.4.5 lib/httparty/core_extensions.rb
jcinnamond-httparty-0.4.6 lib/httparty/core_extensions.rb
jnunemaker-httparty-0.4.5 lib/httparty/core_extensions.rb
luigi-httparty-0.4.6 lib/httparty/core_extensions.rb
httparty-0.4.5 lib/httparty/core_extensions.rb