Class: VideoEmbed::Vimeo::Url
- Inherits:
-
Object
- Object
- VideoEmbed::Vimeo::Url
- Defined in:
- lib/video_embed/vimeo.rb
Instance Attribute Summary collapse
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
- #embed ⇒ Object
-
#initialize(url, options = {}) ⇒ Url
constructor
A new instance of Url.
Constructor Details
#initialize(url, options = {}) ⇒ Url
Returns a new instance of Url.
15 16 17 18 19 |
# File 'lib/video_embed/vimeo.rb', line 15 def initialize(url, = {}) @url = url @width = .fetch(:width, 560) @height = .fetch(:height, 315) end |
Instance Attribute Details
#height ⇒ Object (readonly)
Returns the value of attribute height.
13 14 15 |
# File 'lib/video_embed/vimeo.rb', line 13 def height @height end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
13 14 15 |
# File 'lib/video_embed/vimeo.rb', line 13 def url @url end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
13 14 15 |
# File 'lib/video_embed/vimeo.rb', line 13 def width @width end |
Instance Method Details
#embed ⇒ Object
21 22 23 |
# File 'lib/video_embed/vimeo.rb', line 21 def %Q{<iframe src="http://player.vimeo.com/video/#{video_id}?title=0&byline=0&portrait=0" width="#{width}" height="#{height}" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>} end |