class OpenXml::Docx::Elements::Ruby
Attributes
base[R]
ruby[R]
Public Instance Methods
base=(other)
click to toggle source
# File lib/openxml/docx/elements/ruby.rb, line 14 def base=(other) raise ArgumentError unless other.is_a?(OpenXml::Docx::Elements::Run) @base = other end
ruby=(other)
click to toggle source
# File lib/openxml/docx/elements/ruby.rb, line 19 def ruby=(other) raise ArgumentError unless other.is_a?(OpenXml::Docx::Elements::Run) @ruby = other end
to_xml(xml)
click to toggle source
# File lib/openxml/docx/elements/ruby.rb, line 24 def to_xml(xml) xml[namespace].public_send(tag, xml_attributes) { property_xml(xml) ruby_text_xml(xml) base_text_xml(xml) } end
Private Instance Methods
base_text_xml(xml)
click to toggle source
# File lib/openxml/docx/elements/ruby.rb, line 40 def base_text_xml(xml) xml["w"].rubyBase { base.to_xml(xml) if base } end
ruby_text_xml(xml)
click to toggle source
# File lib/openxml/docx/elements/ruby.rb, line 34 def ruby_text_xml(xml) xml["w"].rt { ruby.to_xml(xml) if ruby } end