Class: REXML::Document

Inherits:
Element
  • Object
show all
Defined in:
lib/gems/activesupport-2.2.2/lib/active_support/core_ext/rexml.rb

Constant Summary collapse

@@entity_expansion_limit =
10_000

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.entity_expansion_limit=(val) ⇒ Object



23
24
25
# File 'lib/gems/activesupport-2.2.2/lib/active_support/core_ext/rexml.rb', line 23

def self.entity_expansion_limit= val
  @@entity_expansion_limit = val
end

Instance Method Details

#record_entity_expansion!Object



27
28
29
30
31
32
33
# File 'lib/gems/activesupport-2.2.2/lib/active_support/core_ext/rexml.rb', line 27

def record_entity_expansion!
  @number_of_expansions ||= 0
  @number_of_expansions += 1
  if @number_of_expansions > @@entity_expansion_limit
    raise "Number of entity expansions exceeded, processing aborted."
  end
end