class Shale::Adapter::REXML::Document
Wrapper around REXML
API
@api private
Attributes
doc[R]
Public Class Methods
new()
click to toggle source
Initialize object
@api private
# File lib/shale/adapter/rexml.rb, line 55 def initialize @doc = ::REXML::Document.new end
Public Instance Methods
add_attribute(element, name, value)
click to toggle source
Add attribute to REXML
element
@param [::REXML::Element] element REXML
element @param [String] name Name of the XML attribute @param [String] value Value of the XML attribute
@api private
# File lib/shale/adapter/rexml.rb, line 77 def add_attribute(element, name, value) element.add_attribute(name, value) end
add_element(element, child)
click to toggle source
add_text(element, text)
click to toggle source
create_element(name)
click to toggle source
Create REXML
element
@param [String] name Name of the XML element
@return [::REXML::Element]
@api private
# File lib/shale/adapter/rexml.rb, line 66 def create_element(name) ::REXML::Element.new(name) end