Module: OpenGraphReader::Parser::XPathHelpers Private

Defined in:
lib/open_graph_reader/parser.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Some helper methods for Nokogiri

Class Method Summary collapse

Class Method Details

.ci_starts_with(node_set, string) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Helper to lowercase all given properties



13
14
15
16
17
# File 'lib/open_graph_reader/parser.rb', line 13

def self.ci_starts_with node_set, string
  node_set.select {|node|
    node.to_s.downcase.start_with? string.downcase
  }
end