Class: OoxmlParser::SlideSize
- Inherits:
-
Object
- Object
- OoxmlParser::SlideSize
- Defined in:
- lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide_size.rb
Instance Attribute Summary collapse
-
#height ⇒ Object
Returns the value of attribute height.
-
#type ⇒ Object
Returns the value of attribute type.
-
#width ⇒ Object
Returns the value of attribute width.
Class Method Summary collapse
Instance Attribute Details
#height ⇒ Object
Returns the value of attribute height.
3 4 5 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide_size.rb', line 3 def height @height end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide_size.rb', line 3 def type @type end |
#width ⇒ Object
Returns the value of attribute width.
3 4 5 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide_size.rb', line 3 def width @width end |
Class Method Details
.parse(slide_size_node) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide_size.rb', line 5 def self.parse() = SlideSize.new .attributes.each do |key, value| case key when 'cx' .width = (value.value.to_f / OoxmlParser.configuration.units_delimiter).round(2) when 'cy' .height = (value.value.to_f / OoxmlParser.configuration.units_delimiter).round(2) when 'type' .type = value.value.to_sym end end end |