Class: ODF::Row
Instance Attribute Summary collapse
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#style ⇒ Object
writeonly
Sets the attribute style.
Instance Method Summary collapse
-
#initialize(number = 0, opts = {}) ⇒ Row
constructor
A new instance of Row.
- #xml ⇒ Object
Methods inherited from Container
Constructor Details
#initialize(number = 0, opts = {}) ⇒ Row
Returns a new instance of Row.
30 31 32 33 |
# File 'lib/odf/row.rb', line 30 def initialize(number=0, opts={}) @number = number @style = opts[:style] end |
Instance Attribute Details
#number ⇒ Object (readonly)
Returns the value of attribute number.
27 28 29 |
# File 'lib/odf/row.rb', line 27 def number @number end |
#style=(value) ⇒ Object (writeonly)
Sets the attribute style
28 29 30 |
# File 'lib/odf/row.rb', line 28 def style=(value) @style = value end |
Instance Method Details
#xml ⇒ Object
35 36 37 38 39 40 41 |
# File 'lib/odf/row.rb', line 35 def xml elem_attrs = {} elem_attrs['table:style-name'] = @style unless @style.nil? Builder::XmlMarkup.new.tag! 'table:table-row', elem_attrs do |xml| xml << cells_xml end end |