Class: Xlsx::Elements::Alignment
- Inherits:
-
Struct
- Object
- Struct
- Xlsx::Elements::Alignment
- Defined in:
- lib/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
3 4 5 |
# File 'lib/xlsx/elements/alignment.rb', line 3 def horizontal @horizontal end |
#indent ⇒ Object
Returns the value of attribute indent
3 4 5 |
# File 'lib/xlsx/elements/alignment.rb', line 3 def indent @indent end |
#vertical ⇒ Object
Returns the value of attribute vertical
3 4 5 |
# File 'lib/xlsx/elements/alignment.rb', line 3 def vertical @vertical end |
#wrapText ⇒ Object
Returns the value of attribute wrapText
3 4 5 |
# File 'lib/xlsx/elements/alignment.rb', line 3 def wrapText @wrapText end |
Instance Method Details
#attributes ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/xlsx/elements/alignment.rb', line 5 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
14 15 16 |
# File 'lib/xlsx/elements/alignment.rb', line 14 def to_xml(xml) xml.alignment(attributes) end |