Class: Mexico::FileSystem::LayerLink

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ LayerLink

Returns a new instance of LayerLink.



44
45
46
47
48
49
50
# File 'lib/mexico/file_system/layer_link.rb', line 44

def initialize(args={})
  args.each do |k,v|
    if self.respond_to?("#{k}=")
      send("#{k}=", v)
    end
  end
end

Instance Attribute Details

#documentObject

Returns the value of attribute document.



33
34
35
# File 'lib/mexico/file_system/layer_link.rb', line 33

def document
  @document
end

#itemObject

Returns the value of attribute item.



32
33
34
# File 'lib/mexico/file_system/layer_link.rb', line 32

def item
  @item
end

Instance Method Details

#after_parseObject

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.



69
70
71
# File 'lib/mexico/file_system/layer_link.rb', line 69

def after_parse

end

#target_objectMexico::FileSystem::Layer Also known as: layer

returns the target object, in this case, a Layer.

Returns:



54
55
56
# File 'lib/mexico/file_system/layer_link.rb', line 54

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)

Parameters:



61
62
63
64
# File 'lib/mexico/file_system/layer_link.rb', line 61

def target_object=(new_target)
  @target_object=new_target
  @target=@target_object.identifier
end