Class: Bitlyr::RealtimeLink

Inherits:
Object
  • Object
show all
Defined in:
lib/bitlyr/realtime_link.rb

Overview

Day objects are created by the realtime_links method of a user

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ RealtimeLink

Returns a new instance of RealtimeLink.



6
7
8
9
# File 'lib/bitlyr/realtime_link.rb', line 6

def initialize(options = {})
  @clicks    = options['clicks']
  @user_hash = options['user_hash']
end

Instance Attribute Details

#clicksObject (readonly)

Returns the value of attribute clicks.



4
5
6
# File 'lib/bitlyr/realtime_link.rb', line 4

def clicks
  @clicks
end

#user_hashObject (readonly)

Returns the value of attribute user_hash.



4
5
6
# File 'lib/bitlyr/realtime_link.rb', line 4

def user_hash
  @user_hash
end

Instance Method Details

#create_url(client) ⇒ Object

A convenience method to create a Bitlyr::Url from the data



12
13
14
# File 'lib/bitlyr/realtime_link.rb', line 12

def create_url(client)
  Bitlyr::Url.new(client, 'user_clicks' => clicks, 'user_hash' => user_hash)
end