lib/polites/parser.rb
# Parse a content fragment, which consists of multiple source elements but
# not necessarily an entire sheet.
#
# @param [String] source
# @return [Array<Node>]
Parse a content fragment, which consists of multiple source elements but
not necessarily an entire sheet.
Parse a content fragment which consists of multiple source elements but not necessarily an entire sheet .
def parse_fragment(source)
      element = case source
                when Nokogiri::XML::Element
                  source
                when String
                  Nokogiri(source)
                end
      element.xpath('string/p').map do |el|
        parse(el)
      end
    end
def parse_fragment ( source ) element = case source when Nokogiri :: XML :: Element source when String Nokogiri ( source ) end element . xpath ( 'string/p' ) . map do | el | parse ( el ) end end
Parse a content fragment, which consists of multiple source elements but
not necessarily an entire sheet.
Parse a content fragment which consists of multiple source elements but not necessarily an entire sheet .
None
Array<Node>
source
<not_specific>
<not_specific>
None