Class: Cameraman::Sources::YouTube
- Inherits:
-
Object
- Object
- Cameraman::Sources::YouTube
- Defined in:
- lib/cameraman/sources/youtube.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
Instance Method Summary collapse
- #embed ⇒ Object
-
#initialize(id) ⇒ YouTube
constructor
A new instance of YouTube.
- #original_url ⇒ Object
Constructor Details
#initialize(id) ⇒ YouTube
Returns a new instance of YouTube.
8 9 10 |
# File 'lib/cameraman/sources/youtube.rb', line 8 def initialize id @id = id end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/cameraman/sources/youtube.rb', line 6 def id @id end |
Instance Method Details
#embed ⇒ Object
12 13 14 |
# File 'lib/cameraman/sources/youtube.rb', line 12 def "http://www.youtube.com/embed/#{@id}" end |
#original_url ⇒ Object
16 17 18 |
# File 'lib/cameraman/sources/youtube.rb', line 16 def original_url "http://www.youtube.com/watch?v=#{@id}" end |