Class: Inform::System::Link

Inherits:
Object show all
Defined in:
lib/runtime/object.rb

Overview

The Inform::System::Link class

Constant Summary collapse

LinkTemplate =
'%<link_name>s -> %<to_name>s [%<to_identity>s]'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(properties) ⇒ Link

Returns a new instance of Link.



698
699
700
701
702
# File 'lib/runtime/object.rb', line 698

def initialize(properties)
  @name = properties[:name]
  @to = properties[:to]
  @from = properties[:from]
end

Instance Attribute Details

#fromObject (readonly)

Returns the value of attribute from.



696
697
698
# File 'lib/runtime/object.rb', line 696

def from
  @from
end

#nameObject (readonly)

Returns the value of attribute name.



696
697
698
# File 'lib/runtime/object.rb', line 696

def name
  @name
end

#toObject (readonly)

Returns the value of attribute to.



696
697
698
# File 'lib/runtime/object.rb', line 696

def to
  @to
end

Instance Method Details

#to_sObject



704
705
706
# File 'lib/runtime/object.rb', line 704

def to_s
  format(LinkTemplate, link_name: name, to_name: to, to_identity: to.identity)
end