Class: Embedda::Filters::Provider
- Inherits:
-
Object
- Object
- Embedda::Filters::Provider
- Defined in:
- lib/embedda/filters/provider.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #get(filter_name) ⇒ Object
-
#initialize(options) ⇒ Provider
constructor
A new instance of Provider.
Constructor Details
#initialize(options) ⇒ Provider
Returns a new instance of Provider.
10 11 12 |
# File 'lib/embedda/filters/provider.rb', line 10 def initialize() @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
9 10 11 |
# File 'lib/embedda/filters/provider.rb', line 9 def @options end |
Instance Method Details
#get(filter_name) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/embedda/filters/provider.rb', line 14 def get(filter_name) case filter_name when :vimeo Vimeo.new(protocol, video_width, video_height, vimeo_params) when :youtube Youtube.new(protocol, video_width, video_height) when :soundcloud Soundcloud.new else raise UnknownFilter.new(filter_name) end end |