class Rundoc::CodeCommand::Website::Screenshot
Public Class Methods
Source
# File lib/rundoc/code_command/website/screenshot.rb, line 3 def initialize(name:, upload: false) @name = name @upload = upload @driver = nil end
Public Instance Methods
Source
# File lib/rundoc/code_command/website/screenshot.rb, line 17 def call(env = {}) puts "Taking screenshot: #{driver.current_url}" filename = driver.screenshot( upload: @upload, screenshots_dir: env[:context].screenshots_dir ) relative_filename = filename.relative_path_from(env[:context].output_dir) env[:before] << "" "" end
Source
# File lib/rundoc/code_command/website/screenshot.rb, line 9 def driver @driver ||= Rundoc::CodeCommand::Website::Driver.find(@name) end
Source
# File lib/rundoc/code_command/website/screenshot.rb, line 13 def to_md(env = {}) "" end