module LLT::Review::Helpers::Parsing

Public Instance Methods

handler() click to toggle source
# File lib/llt/review/helpers/parsing.rb, line 14
def handler
  @handler ||= begin
    if RUBY_PLATFORM == 'java'
      namespace.const_get(:NokogiriHandler).new
    else
      namespace.const_get(:OxHandler).new
    end
  end
end
namespace() click to toggle source
# File lib/llt/review/helpers/parsing.rb, line 24
def namespace
  self.class
end
parse(data) click to toggle source
# File lib/llt/review/helpers/parsing.rb, line 7
def parse(data)
  io = StringIO.new(data)
  handler.parse(io)
  io.close
  handler.result
end