Class: Videoinfo::Result

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#mediainfoObject

Returns the value of attribute mediainfo.



4
5
6
# File 'lib/videoinfo/result.rb', line 4

def mediainfo
  @mediainfo
end

#screenshot_urlsObject

Returns the value of attribute screenshot_urls.



4
5
6
# File 'lib/videoinfo/result.rb', line 4

def screenshot_urls
  @screenshot_urls
end

Instance Method Details

#to_sObject



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/videoinfo/result.rb', line 6

def to_s
  output = []

  if screenshot_urls && screenshot_urls.size > 0
    output += ['[b]Screenshots:[/b]', '[quote][align=center]']
    output += screenshot_urls.map { |url| "[img=#{url}]" }
    output += ['[/align][/quote]', '']
  end

  output += ['[mediainfo]', mediainfo, '[/mediainfo]']

  output.join("\n")
end