Class: Workarea::VideoEmbedParser
- Inherits:
-
Object
- Object
- Workarea::VideoEmbedParser
- Defined in:
- app/services/workarea/video_embed_parser.rb
Instance Method Summary collapse
-
#initialize(embed_code, options = {}) ⇒ VideoEmbedParser
constructor
A new instance of VideoEmbedParser.
- #video_params ⇒ Object
Constructor Details
#initialize(embed_code, options = {}) ⇒ VideoEmbedParser
Returns a new instance of VideoEmbedParser.
3 4 5 6 |
# File 'app/services/workarea/video_embed_parser.rb', line 3 def initialize(, = {}) @parsed_embed_code = Nokogiri::HTML.fragment().children.first @options = end |
Instance Method Details
#video_params ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'app/services/workarea/video_embed_parser.rb', line 8 def video_params { embed_id: , url: url, host: uri.host, aspect_ratio: aspect_ratio } end |