Class: Philologic::Client::Link
- Inherits:
-
Object
- Object
- Philologic::Client::Link
- Defined in:
- lib/philologic-client/link.rb
Overview
Philologic link.
Instance Attribute Summary collapse
-
#text ⇒ Object
readonly
Get link text or nil.
-
#url ⇒ Object
readonly
Get link URL.
Instance Method Summary collapse
-
#initialize(url, text = nil) ⇒ Link
constructor
Initialize Philologic::Client::Link object.
Constructor Details
#initialize(url, text = nil) ⇒ Link
Initialize Philologic::Client::Link object.
Params:
url
-
URL
text
-
(optional) Text or
nil
27 28 29 30 31 |
# File 'lib/philologic-client/link.rb', line 27 def initialize(url, text = nil) raise('nil link') if url.nil? @text = text @url = url end |
Instance Attribute Details
#text ⇒ Object (readonly)
Get link text or nil.
13 14 15 |
# File 'lib/philologic-client/link.rb', line 13 def text @text end |
#url ⇒ Object (readonly)
Get link URL.
18 19 20 |
# File 'lib/philologic-client/link.rb', line 18 def url @url end |