How to use the PreviousSibling<T>() method in Ruby

What is Ruby?

Ruby is a pure object-oriented language. One of its key features, as compared to other languages, is its simplicity. It is easy to read and write.

Features of Ruby

  • Can be linked with HTML.
  • Simplicity makes it easier for a new developer to learn the language.
  • Used for developing internet and intranet applications.
  • Has a significant number of inbuilt functions, which increases the functionality of the language.
  • Has similar syntax to C++ and many other programming languages.
  • Is connectable to MySQL, Oracle, DB2.
  • Is a server-side language identical to Perl and Python.

PreviousSibling<T>() method in Ruby

The PreviousSibling<T>() method acquires the class element with the particular type that precedes the current class element. It returns null if there is no preceding class element found.

Syntax

The syntax of the PreviousSibling<T>() method is as follows:

public T PreviousSibling<T> () where T : DocumentFormat.OpenXml.OpenXmlElement;

Return value

This method returns the OpenXMLElement element of type T that precedes the current class element.