Class: Mexico::FileSystem::PointLink

Inherits:
Object
  • Object
show all
Includes:
Poseidon, ROXML
Defined in:
lib/mexico/file_system/point_link.rb

Overview

a link that targets an interval out of a scale object.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ PointLink

Returns a new instance of PointLink.


53
54
55
56
57
58
59
# File 'lib/mexico/file_system/point_link.rb', line 53

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


42
43
44
# File 'lib/mexico/file_system/point_link.rb', line 42

def document
  @document
end

#itemObject

Returns the value of attribute item


41
42
43
# File 'lib/mexico/file_system/point_link.rb', line 41

def item
  @item
end

Instance Method Details

#after_parsevoid

This method returns an undefined value.

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.


79
80
81
# File 'lib/mexico/file_system/point_link.rb', line 79

def after_parse

end

#identifier=(new_id) ⇒ Object


28
29
30
# File 'lib/mexico/file_system/point_link.rb', line 28

def identifier=(new_id)
  @identifier = Mexico::Util::to_xml_id(new_id)
end

#target_objectMexico::FileSystem::Scale

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

Returns:


63
64
65
# File 'lib/mexico/file_system/point_link.rb', line 63

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:


70
71
72
73
# File 'lib/mexico/file_system/point_link.rb', line 70

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