Class: Mexico::FileSystem::IntervalLink

Inherits:
Object
  • Object
show all
Includes:
Poseidon, ROXML
Defined in:
lib/mexico/file_system/interval_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 = {}) ⇒ IntervalLink

Returns a new instance of IntervalLink.


59
60
61
62
63
64
65
# File 'lib/mexico/file_system/interval_link.rb', line 59

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


45
46
47
# File 'lib/mexico/file_system/interval_link.rb', line 45

def document
  @document
end

#itemObject

Returns the value of attribute item


44
45
46
# File 'lib/mexico/file_system/interval_link.rb', line 44

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.


84
85
86
# File 'lib/mexico/file_system/interval_link.rb', line 84

def after_parse

end

#identifier=(new_id) ⇒ Object


28
29
30
# File 'lib/mexico/file_system/interval_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:


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

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:


76
77
78
79
# File 'lib/mexico/file_system/interval_link.rb', line 76

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