Class: Philologic::Client::Link

Inherits:
Object
  • Object
show all
Defined in:
lib/philologic-client/link.rb

Overview

Philologic link.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#textObject (readonly)

Get link text or nil.



13
14
15
# File 'lib/philologic-client/link.rb', line 13

def text
  @text
end

#urlObject (readonly)

Get link URL.



18
19
20
# File 'lib/philologic-client/link.rb', line 18

def url
  @url
end