Class: Flickr::Auth::Token

Inherits:
Object show all
Defined in:
lib/flickr/token.rb

Overview

wrapping class to hold a flickr size

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ Token

create a new instance of a flickr auth token.

Params

  • attributes (Required)

    a hash of attributes used to set the initial values of the token object
    


11
12
13
14
15
# File 'lib/flickr/token.rb', line 11

def initialize(attributes)
  attributes.each do |k,v|
    send("#{k}=", v) if respond_to?("#{k}=")
  end
end

Instance Attribute Details

#permisionsObject

Returns the value of attribute permisions.



4
5
6
# File 'lib/flickr/token.rb', line 4

def permisions
  @permisions
end

#tokenObject

Returns the value of attribute token.



4
5
6
# File 'lib/flickr/token.rb', line 4

def token
  @token
end

#user_idObject

Returns the value of attribute user_id.



4
5
6
# File 'lib/flickr/token.rb', line 4

def user_id
  @user_id
end

#user_real_nameObject

Returns the value of attribute user_real_name.



4
5
6
# File 'lib/flickr/token.rb', line 4

def user_real_name
  @user_real_name
end

#usernameObject

Returns the value of attribute username.



4
5
6
# File 'lib/flickr/token.rb', line 4

def username
  @username
end

Instance Method Details

#to_sObject

overide the default to_s to output the text of the token



19
20
21
# File 'lib/flickr/token.rb', line 19

def to_s
  self.token.to_s
end