Class: VideoParser::VideoSite

Inherits:
Object
  • Object
show all
Includes:
GateWay
Defined in:
lib/video_parser/video_site.rb

Direct Known Subclasses

SlideShare, TuDou, YouKu

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from GateWay

#get_doc

Constructor Details

#initialize(uri) ⇒ VideoSite

Returns a new instance of VideoSite.



8
9
10
# File 'lib/video_parser/video_site.rb', line 8

def initialize(uri)
  @uri = uri
end

Instance Attribute Details

#docObject (readonly)

Returns the value of attribute doc.



6
7
8
# File 'lib/video_parser/video_site.rb', line 6

def doc
  @doc
end

#uriObject (readonly)

Returns the value of attribute uri.



6
7
8
# File 'lib/video_parser/video_site.rb', line 6

def uri
  @uri
end

Instance Method Details

#get(options = {}) ⇒ Object



12
13
14
15
# File 'lib/video_parser/video_site.rb', line 12

def get(options = {})
  @doc = get_doc(uri, options)
  extract_video_info
end