Class: LWAC::Link

Inherits:
Object
  • Object
show all
Defined in:
lib/lwac/shared/data_types.rb

Overview


Holds a link. Immutable.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, uri) ⇒ Link

Returns a new instance of Link.



188
189
190
191
# File 'lib/lwac/shared/data_types.rb', line 188

def initialize(id, uri)
  @id = id
  @uri = uri
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



186
187
188
# File 'lib/lwac/shared/data_types.rb', line 186

def id
  @id
end

#uriObject (readonly)

Returns the value of attribute uri.



186
187
188
# File 'lib/lwac/shared/data_types.rb', line 186

def uri
  @uri
end

Instance Method Details

#to_sObject



193
194
195
# File 'lib/lwac/shared/data_types.rb', line 193

def to_s
  "<#{@id}|#{@uri}>"
end