Method: REXML::AttlistDecl#initialize

Defined in:
lib/rexml/attlistdecl.rb

#initialize(source) ⇒ AttlistDecl

Create an AttlistDecl, pulling the information from a Source. Notice that this isn’t very convenient; to create an AttlistDecl, you basically have to format it yourself, and then have the initializer parse it. Sorry, but for the foreseeable future, DTD support in REXML is pretty weak on convenience. Have I mentioned how much I hate DTDs?



29
30
31
32
33
34
# File 'lib/rexml/attlistdecl.rb', line 29

def initialize(source)
  super()
  if (source.kind_of? Array)
    @element_name, @pairs, @contents = *source
  end
end