Class: Bitly::V4::Bitlink

Inherits:
Object
  • Object
show all
Defined in:
lib/bitly/v4/bitlink.rb

Overview

Bitlink.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Bitlink

Returns a new instance of Bitlink.



9
10
11
12
13
# File 'lib/bitly/v4/bitlink.rb', line 9

def initialize(data)
  @id = data[:id]
  @short_url = data[:link]
  @long_url  = data[:long_url]
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



7
8
9
# File 'lib/bitly/v4/bitlink.rb', line 7

def id
  @id
end

#long_urlObject

Returns the value of attribute long_url.



7
8
9
# File 'lib/bitly/v4/bitlink.rb', line 7

def long_url
  @long_url
end

#short_urlObject

Returns the value of attribute short_url.



7
8
9
# File 'lib/bitly/v4/bitlink.rb', line 7

def short_url
  @short_url
end