Class: Link

Inherits:
Element show all
Defined in:
lib/lucidMachines/elements.rb

Instance Attribute Summary collapse

Attributes inherited from Element

#hidden, #id, #initial, #page, #page_id, #text, #type

Instance Method Summary collapse

Methods inherited from Element

#has_links?, #hide, #is_hidden?, #is_initial?, #is_state?, #link_from, #link_to, #links_from, #links_from_type, #links_to, #links_to_type, #set_initial, #set_page

Constructor Details

#initialize(entry) ⇒ Link

Returns a new instance of Link.



103
104
105
106
107
108
109
110
# File 'lib/lucidMachines/elements.rb', line 103

def initialize(entry)
  super(entry)
  @source = entry["Line Source"]
  @destination = entry["Line Destination"]

  @source_arrow = entry["Source Arrow"]
  @destination_arrow= entry["Destination Arrow"]
end

Instance Attribute Details

#destinationObject (readonly)

Returns the value of attribute destination.



100
101
102
# File 'lib/lucidMachines/elements.rb', line 100

def destination
  @destination
end

#destination_arrowObject (readonly)

Returns the value of attribute destination_arrow.



101
102
103
# File 'lib/lucidMachines/elements.rb', line 101

def destination_arrow
  @destination_arrow
end

#sourceObject (readonly)

Returns the value of attribute source.



100
101
102
# File 'lib/lucidMachines/elements.rb', line 100

def source
  @source
end

#source_arrowObject (readonly)

Returns the value of attribute source_arrow.



101
102
103
# File 'lib/lucidMachines/elements.rb', line 101

def source_arrow
  @source_arrow
end

Instance Method Details

#to_sObject



112
113
114
# File 'lib/lucidMachines/elements.rb', line 112

def to_s
  "Link : " + @source.to_s + " -> " + @destination.to_s
end