Class: LWAC::Link
- Inherits:
-
Object
- Object
- LWAC::Link
- Defined in:
- lib/lwac/shared/data_types.rb
Overview
Holds a link. Immutable.
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
-
#initialize(id, uri) ⇒ Link
constructor
A new instance of Link.
- #to_s ⇒ Object
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
#id ⇒ Object (readonly)
Returns the value of attribute id.
186 187 188 |
# File 'lib/lwac/shared/data_types.rb', line 186 def id @id end |
#uri ⇒ Object (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_s ⇒ Object
193 194 195 |
# File 'lib/lwac/shared/data_types.rb', line 193 def to_s "<#{@id}|#{@uri}>" end |