Class: Zemus::Soundcloud
- Inherits:
-
Object
- Object
- Zemus::Soundcloud
- Defined in:
- lib/zemus/soundcloud.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(url) ⇒ Soundcloud
constructor
A new instance of Soundcloud.
- #to_embed ⇒ Object
Constructor Details
#initialize(url) ⇒ Soundcloud
Returns a new instance of Soundcloud.
8 9 10 |
# File 'lib/zemus/soundcloud.rb', line 8 def initialize(url) @url = url end |
Class Method Details
.valid?(url) ⇒ Boolean
4 5 6 |
# File 'lib/zemus/soundcloud.rb', line 4 def self.valid?(url) url =~ /soundcloud.com/ end |
Instance Method Details
#to_embed ⇒ Object
12 13 14 |
# File 'lib/zemus/soundcloud.rb', line 12 def "<iframe autosize='false' width='100%' height='166px' scrolling='no' frameborder='no' src='https://w.soundcloud.com/player/?url=#{@url}'></iframe>" end |