Class: Goldendocx::Images::Shape
- Inherits:
-
Object
- Object
- Goldendocx::Images::Shape
- Includes:
- Element
- Defined in:
- lib/goldendocx/images/shape.rb
Instance Method Summary collapse
- #height=(height) ⇒ Object
-
#initialize(**attributes) ⇒ Shape
constructor
A new instance of Shape.
- #relationship_id=(relationship_id) ⇒ Object
- #width=(width) ⇒ Object
Methods included from Element
#build_element, #namespace, #tag, #tag_name, #to_element, #to_xml
Methods included from HasChildren
#children, #read_child, #read_children
Methods included from HasAttributes
#assign_attributes, #attributes, #read_attributes
Constructor Details
#initialize(**attributes) ⇒ Shape
Returns a new instance of Shape.
13 14 15 16 17 |
# File 'lib/goldendocx/images/shape.rb', line 13 def initialize(**attributes) attributes.each do |name, value| send("#{name}=", value) if respond_to?("#{name}=") end end |
Instance Method Details
#height=(height) ⇒ Object
23 24 25 |
# File 'lib/goldendocx/images/shape.rb', line 23 def height=(height) property.height = height if height end |
#relationship_id=(relationship_id) ⇒ Object
27 28 29 |
# File 'lib/goldendocx/images/shape.rb', line 27 def relationship_id=(relationship_id) property.image_data.relationship_id = relationship_id if relationship_id end |
#width=(width) ⇒ Object
19 20 21 |
# File 'lib/goldendocx/images/shape.rb', line 19 def width=(width) property.width = width if width end |