Class: OpenXml::Elements::Relationship
- Inherits:
-
Struct
- Object
- Struct
- OpenXml::Elements::Relationship
- Defined in:
- lib/openxml/relationship.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#target ⇒ Object
Returns the value of attribute target.
-
#target_mode ⇒ Object
Returns the value of attribute target_mode.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type, target, id = nil, target_mode = nil) ⇒ Relationship
constructor
A new instance of Relationship.
Constructor Details
#initialize(type, target, id = nil, target_mode = nil) ⇒ Relationship
Returns a new instance of Relationship.
4 5 6 |
# File 'lib/openxml/relationship.rb', line 4 def initialize(type, target, id=nil, target_mode=nil) super type, target, id || "R#{SecureRandom.hex}", target_mode end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id
3 4 5 |
# File 'lib/openxml/relationship.rb', line 3 def id @id end |
#target ⇒ Object
Returns the value of attribute target
3 4 5 |
# File 'lib/openxml/relationship.rb', line 3 def target @target end |
#target_mode ⇒ Object
Returns the value of attribute target_mode
3 4 5 |
# File 'lib/openxml/relationship.rb', line 3 def target_mode @target_mode end |
#type ⇒ Object
Returns the value of attribute type
3 4 5 |
# File 'lib/openxml/relationship.rb', line 3 def type @type end |