Class: OpenXml::Xlsx::Elements::Alignment
- Inherits:
-
Struct
- Object
- Struct
- OpenXml::Xlsx::Elements::Alignment
- Defined in:
- lib/openxml/xlsx/elements/alignment.rb
Instance Attribute Summary collapse
-
#horizontal ⇒ Object
Returns the value of attribute horizontal.
-
#indent ⇒ Object
Returns the value of attribute indent.
-
#vertical ⇒ Object
Returns the value of attribute vertical.
-
#wrapText ⇒ Object
Returns the value of attribute wrapText.
Instance Method Summary collapse
Instance Attribute Details
#horizontal ⇒ Object
Returns the value of attribute horizontal
4 5 6 |
# File 'lib/openxml/xlsx/elements/alignment.rb', line 4 def horizontal @horizontal end |
#indent ⇒ Object
Returns the value of attribute indent
4 5 6 |
# File 'lib/openxml/xlsx/elements/alignment.rb', line 4 def indent @indent end |
#vertical ⇒ Object
Returns the value of attribute vertical
4 5 6 |
# File 'lib/openxml/xlsx/elements/alignment.rb', line 4 def vertical @vertical end |
#wrapText ⇒ Object
Returns the value of attribute wrapText
4 5 6 |
# File 'lib/openxml/xlsx/elements/alignment.rb', line 4 def wrapText @wrapText end |
Instance Method Details
#attributes ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/openxml/xlsx/elements/alignment.rb', line 6 def attributes {}.tap do |attrs| attrs[:horizontal] = horizontal if horizontal attrs[:vertical] = vertical if vertical attrs[:indent] = indent if indent attrs[:wrapText] = wrapText if wrapText end end |
#to_xml(xml) ⇒ Object
15 16 17 |
# File 'lib/openxml/xlsx/elements/alignment.rb', line 15 def to_xml(xml) xml.alignment(attributes) end |