Class: OmniAI::Tools::Browser::InspectTool
- Defined in:
- lib/omniai/tools/browser/inspect_tool.rb
Overview
Instance Method Summary collapse
Methods inherited from BaseTool
Constructor Details
This class inherits a constructor from OmniAI::Tools::Browser::BaseTool
Instance Method Details
#execute ⇒ String
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/omniai/tools/browser/inspect_tool.rb', line 16 def execute @logger.info("#{self.class.name}##{__method__}") html = @browser.html doc = Nokogiri::HTML(html) doc.css("link").each(&:remove) doc.css("style").each(&:remove) doc.css("script").each(&:remove) doc.to_html end |