Class: Mexico::FileSystem::LayerLink
- Inherits:
-
Object
- Object
- Mexico::FileSystem::LayerLink
- Includes:
- Poseidon, ROXML
- Defined in:
- lib/mexico/file_system/layer_link.rb
Overview
A link from an item to a layer.
Instance Attribute Summary collapse
-
#document ⇒ Object
Returns the value of attribute document.
-
#item ⇒ Object
Returns the value of attribute item.
Instance Method Summary collapse
-
#after_parse ⇒ Object
This method attempts to link objects from other locations of the XML/object tree into position inside this object, by following the xml ids given in the appropriate fields of this class.
- #identifier=(new_id) ⇒ Object
-
#initialize(args = {}) ⇒ LayerLink
constructor
A new instance of LayerLink.
-
#target_object ⇒ Mexico::FileSystem::Layer
(also: #layer)
returns the target object, in this case, a Layer.
-
#target_object=(new_target) ⇒ void
Sets a new target object (and updates the corresponding identifier).
Constructor Details
#initialize(args = {}) ⇒ LayerLink
Returns a new instance of LayerLink.
48 49 50 51 52 53 54 |
# File 'lib/mexico/file_system/layer_link.rb', line 48 def initialize(args={}) args.each do |k,v| if self.respond_to?("#{k}=") send("#{k}=", v) end end end |
Instance Attribute Details
#document ⇒ Object
Returns the value of attribute document.
37 38 39 |
# File 'lib/mexico/file_system/layer_link.rb', line 37 def document @document end |
#item ⇒ Object
Returns the value of attribute item.
36 37 38 |
# File 'lib/mexico/file_system/layer_link.rb', line 36 def item @item end |
Instance Method Details
#after_parse ⇒ Object
This method attempts to link objects from other locations of the XML/object tree into position inside this object, by following the xml ids given in the appropriate fields of this class.
73 74 75 |
# File 'lib/mexico/file_system/layer_link.rb', line 73 def after_parse end |
#identifier=(new_id) ⇒ Object
28 29 30 |
# File 'lib/mexico/file_system/layer_link.rb', line 28 def identifier=(new_id) @identifier = Mexico::Util::to_xml_id(new_id) end |
#target_object ⇒ Mexico::FileSystem::Layer Also known as: layer
returns the target object, in this case, a Layer.
58 59 60 |
# File 'lib/mexico/file_system/layer_link.rb', line 58 def target_object @target_object end |
#target_object=(new_target) ⇒ void
This method returns an undefined value.
Sets a new target object (and updates the corresponding identifier)
65 66 67 68 |
# File 'lib/mexico/file_system/layer_link.rb', line 65 def target_object=(new_target) @target_object=new_target @target=@target_object.identifier end |