Class: YoutubeVideo::Author

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

Overview

comment’s author infomation

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Author



7
8
9
10
11
12
13
# File 'lib/YPBT/author.rb', line 7

def initialize(data)
  return unless data
  @author_name = data['authorDisplayName']
  @author_image_url = data['authorProfileImageUrl']
  @author_channel_url = data['authorChannelUrl']
  @like_count = data['likeCount'].to_i
end

Instance Attribute Details

#author_channel_urlObject (readonly)

Returns the value of attribute author_channel_url.



5
6
7
# File 'lib/YPBT/author.rb', line 5

def author_channel_url
  @author_channel_url
end

#author_image_urlObject (readonly)

Returns the value of attribute author_image_url.



5
6
7
# File 'lib/YPBT/author.rb', line 5

def author_image_url
  @author_image_url
end

#author_nameObject (readonly)

Returns the value of attribute author_name.



5
6
7
# File 'lib/YPBT/author.rb', line 5

def author_name
  @author_name
end

#like_countObject (readonly)

Returns the value of attribute like_count.



5
6
7
# File 'lib/YPBT/author.rb', line 5

def like_count
  @like_count
end