Class: Mexico::FileSystem::LayerConnector
- Inherits:
-
Object
- Object
- Mexico::FileSystem::LayerConnector
- Includes:
- ROXML
- Defined in:
- lib/mexico/file_system/layer_connector.rb
Overview
A typed connector between two layers (or tiers) in an transcription or annotation document.
Instance Attribute Summary collapse
-
#document ⇒ Object
Returns the value of attribute document.
Instance Method Summary collapse
-
#initialize(new_source, new_target, args = {}) ⇒ LayerConnector
constructor
A new instance of LayerConnector.
-
#source ⇒ Layer
Retrieves the source layer for this layer connector.
-
#source=(new_source_layer) ⇒ void
Sets a new source layer for this layer connector.
-
#target ⇒ Layer
Retrieves the target layer for this layer connector.
-
#target=(new_target_layer) ⇒ void
Sets a new target layer for this layer connector.
Constructor Details
#initialize(new_source, new_target, args = {}) ⇒ LayerConnector
Returns a new instance of LayerConnector.
36 37 38 39 40 41 42 43 44 |
# File 'lib/mexico/file_system/layer_connector.rb', line 36 def initialize(new_source, new_target, args={}) self.source= new_source self.target= new_target 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.
33 34 35 |
# File 'lib/mexico/file_system/layer_connector.rb', line 33 def document @document end |
Instance Method Details
#source ⇒ Layer
Retrieves the source layer for this layer connector.
48 49 50 |
# File 'lib/mexico/file_system/layer_connector.rb', line 48 def source @source end |
#source=(new_source_layer) ⇒ void
This method returns an undefined value.
Sets a new source layer for this layer connector.
55 56 57 58 |
# File 'lib/mexico/file_system/layer_connector.rb', line 55 def source=(new_source_layer) @source = new_source_layer @source_id = @source.identifier end |
#target ⇒ Layer
Retrieves the target layer for this layer connector.
62 63 64 |
# File 'lib/mexico/file_system/layer_connector.rb', line 62 def target @target end |
#target=(new_target_layer) ⇒ void
This method returns an undefined value.
Sets a new target layer for this layer connector.
69 70 71 72 |
# File 'lib/mexico/file_system/layer_connector.rb', line 69 def target=(new_target_layer) @target = new_target_layer @target_id = @target.identifier end |