Class: RODF::Column
- Inherits:
-
Object
- Object
- RODF::Column
- Defined in:
- lib/rodf/column.rb
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Column
constructor
A new instance of Column.
- #style=(style_name) ⇒ Object
- #xml ⇒ Object
Constructor Details
#initialize(opts = {}) ⇒ Column
Returns a new instance of Column.
3 4 5 6 7 8 9 10 11 |
# File 'lib/rodf/column.rb', line 3 def initialize(opts={}) @elem_attrs = {} @elem_attrs['table:style-name'] = opts[:style] unless opts[:style].nil? if opts[:attributes] @elem_attrs.merge!(opts[:attributes]) end end |
Instance Method Details
#style=(style_name) ⇒ Object
13 14 15 |
# File 'lib/rodf/column.rb', line 13 def style=(style_name) @elem_attrs['table:style-name'] = style_name end |
#xml ⇒ Object
17 18 19 |
# File 'lib/rodf/column.rb', line 17 def xml Builder::XmlMarkup.new.tag! 'table:table-column', @elem_attrs end |