Class: Birt::Core::BaseReport
- Inherits:
-
Object
- Object
- Birt::Core::BaseReport
- Defined in:
- lib/birt/core/base_report.rb
Direct Known Subclasses
LineChartReport, Property, SeriesRow, TableCellData, TableCellLabel, TableDetail, TableFooter, TableHeader, TableReport, TableRow, TableRowCell, TextProperty
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
Instance Method Summary collapse
- #elem_text(xml_element, xpath) ⇒ Object
-
#initialize(xml_element) {|_self| ... } ⇒ BaseReport
constructor
A new instance of BaseReport.
Constructor Details
#initialize(xml_element) {|_self| ... } ⇒ BaseReport
Returns a new instance of BaseReport.
4 5 6 7 8 9 10 |
# File 'lib/birt/core/base_report.rb', line 4 def initialize(xml_element) if xml_element self.id = xml_element.attribute(:id).value if xml_element.attribute(:id) end yield(self) if block_given? end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
2 3 4 |
# File 'lib/birt/core/base_report.rb', line 2 def id @id end |
Instance Method Details
#elem_text(xml_element, xpath) ⇒ Object
12 13 14 15 |
# File 'lib/birt/core/base_report.rb', line 12 def elem_text(xml_element, xpath) elements = xml_element.get_elements(xpath) elements&&elements[0] ? elements[0].text : nil end |