Skip to content

Commit

Permalink
Replace ActiveSupport syntax with pure Ruby
Browse files Browse the repository at this point in the history
  • Loading branch information
Spone committed Mar 11, 2018
1 parent 44c1a06 commit 7b434c2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/video_info/providers/youtube_scraper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,10 @@ def meta_nodes
def meta_node_value(name)
if available?
node = meta_nodes.detect do |n|
n.attr('name').present? && n.attr('name').value == name
n.attr('name') && n.attr('name').value == name
end

return nil if node.attr('content').nil?

node.attr('content').value
node && node.attr('content') && node.attr('content').value
end
end

Expand Down

0 comments on commit 7b434c2

Please sign in to comment.