Class: OoxmlParser::FillRectangle
- Inherits:
-
Object
- Object
- OoxmlParser::FillRectangle
- Defined in:
- lib/ooxml_parser/common_parser/common_data/colors/image/stretching/fill_rectangle.rb
Instance Attribute Summary collapse
-
#bottom ⇒ Object
Returns the value of attribute bottom.
-
#left ⇒ Object
Returns the value of attribute left.
-
#right ⇒ Object
Returns the value of attribute right.
-
#top ⇒ Object
Returns the value of attribute top.
Class Method Summary collapse
Instance Attribute Details
#bottom ⇒ Object
Returns the value of attribute bottom.
3 4 5 |
# File 'lib/ooxml_parser/common_parser/common_data/colors/image/stretching/fill_rectangle.rb', line 3 def bottom @bottom end |
#left ⇒ Object
Returns the value of attribute left.
3 4 5 |
# File 'lib/ooxml_parser/common_parser/common_data/colors/image/stretching/fill_rectangle.rb', line 3 def left @left end |
#right ⇒ Object
Returns the value of attribute right.
3 4 5 |
# File 'lib/ooxml_parser/common_parser/common_data/colors/image/stretching/fill_rectangle.rb', line 3 def right @right end |
#top ⇒ Object
Returns the value of attribute top.
3 4 5 |
# File 'lib/ooxml_parser/common_parser/common_data/colors/image/stretching/fill_rectangle.rb', line 3 def top @top end |
Class Method Details
.parse(fill_rectangle_node) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/ooxml_parser/common_parser/common_data/colors/image/stretching/fill_rectangle.rb', line 5 def self.parse(fill_rectangle_node) fill_rectangle = FillRectangle.new fill_rectangle_node.attributes.each do |key, value| case key when 'b' fill_rectangle.bottom = value.value.to_i when 't' fill_rectangle.top = value.value.to_i when 'l' fill_rectangle.left = value.value.to_i when 'r' fill_rectangle.right = value.value.to_i end end fill_rectangle end |