Class: YouTube::Profile

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ Profile

Returns a new instance of Profile.



172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
# File 'lib/youtube.rb', line 172

def initialize(payload)
  @about_me = payload['about_me']
  @age = payload['age'].to_i
  @books = payload['books']
  @city = payload['city']
  @companies = payload['companies']
  @country = payload['country']
  @currently_on = YouTube._string_to_boolean(payload['currently_on'])
  @favorite_video_count = payload['favorite_video_count'].to_i
  @first_name = payload['first_name']
  @friend_count = payload['friend_count'].to_i
  @gender = payload['gender']
  @hobbies = payload['hobbies']
  @homepage = payload['homepage']
  @hometown = payload['hometown']
  @last_name = payload['last_name']
  @movies = payload['movies']
  @occupations = payload['occupations']
  @relationship = payload['relationship']
  @video_upload_count = payload['video_upload_count'].to_i
  @video_watch_count = payload['video_watch_count'].to_i
end

Instance Attribute Details

#about_meObject (readonly)

Returns the value of attribute about_me.



151
152
153
# File 'lib/youtube.rb', line 151

def about_me
  @about_me
end

#ageObject (readonly)

Returns the value of attribute age.



152
153
154
# File 'lib/youtube.rb', line 152

def age
  @age
end

#booksObject (readonly)

Returns the value of attribute books.



153
154
155
# File 'lib/youtube.rb', line 153

def books
  @books
end

#cityObject (readonly)

Returns the value of attribute city.



154
155
156
# File 'lib/youtube.rb', line 154

def city
  @city
end

#companiesObject (readonly)

Returns the value of attribute companies.



155
156
157
# File 'lib/youtube.rb', line 155

def companies
  @companies
end

#countryObject (readonly)

Returns the value of attribute country.



156
157
158
# File 'lib/youtube.rb', line 156

def country
  @country
end

#currently_onObject (readonly)

Returns the value of attribute currently_on.



157
158
159
# File 'lib/youtube.rb', line 157

def currently_on
  @currently_on
end

#favorite_video_countObject (readonly)

Returns the value of attribute favorite_video_count.



158
159
160
# File 'lib/youtube.rb', line 158

def favorite_video_count
  @favorite_video_count
end

#first_nameObject (readonly)

Returns the value of attribute first_name.



159
160
161
# File 'lib/youtube.rb', line 159

def first_name
  @first_name
end

#friend_countObject (readonly)

Returns the value of attribute friend_count.



160
161
162
# File 'lib/youtube.rb', line 160

def friend_count
  @friend_count
end

#genderObject (readonly)

Returns the value of attribute gender.



161
162
163
# File 'lib/youtube.rb', line 161

def gender
  @gender
end

#hobbiesObject (readonly)

Returns the value of attribute hobbies.



162
163
164
# File 'lib/youtube.rb', line 162

def hobbies
  @hobbies
end

#homepageObject (readonly)

Returns the value of attribute homepage.



163
164
165
# File 'lib/youtube.rb', line 163

def homepage
  @homepage
end

#hometownObject (readonly)

Returns the value of attribute hometown.



164
165
166
# File 'lib/youtube.rb', line 164

def hometown
  @hometown
end

#last_nameObject (readonly)

Returns the value of attribute last_name.



165
166
167
# File 'lib/youtube.rb', line 165

def last_name
  @last_name
end

#moviesObject (readonly)

Returns the value of attribute movies.



166
167
168
# File 'lib/youtube.rb', line 166

def movies
  @movies
end

#occupationsObject (readonly)

Returns the value of attribute occupations.



167
168
169
# File 'lib/youtube.rb', line 167

def occupations
  @occupations
end

#relationshipObject (readonly)

Returns the value of attribute relationship.



168
169
170
# File 'lib/youtube.rb', line 168

def relationship
  @relationship
end

#video_upload_countObject (readonly)

Returns the value of attribute video_upload_count.



169
170
171
# File 'lib/youtube.rb', line 169

def video_upload_count
  @video_upload_count
end

#video_watch_countObject (readonly)

Returns the value of attribute video_watch_count.



170
171
172
# File 'lib/youtube.rb', line 170

def video_watch_count
  @video_watch_count
end