Class: Rundoc::CodeCommand::Website::Navigate

Inherits:
Rundoc::CodeCommand show all
Defined in:
lib/rundoc/code_command/website/navigate.rb

Constant Summary

Constants inherited from Rundoc::CodeCommand

NEWLINE, RUNDOC_DEFAULT_ERB_BINDING, RUNDOC_ERB_BINDINGS

Instance Attribute Summary

Attributes inherited from Rundoc::CodeCommand

#command, #contents, #keyword, #original_args, #render_command, #render_result

Instance Method Summary collapse

Methods inherited from Rundoc::CodeCommand

#push

Constructor Details

#initialize(name:) ⇒ Navigate

Returns a new instance of Navigate.



3
4
5
6
# File 'lib/rundoc/code_command/website/navigate.rb', line 3

def initialize(name:)
  @name = name
  @driver = nil
end

Instance Method Details

#call(env = {}) ⇒ Object



16
17
18
19
20
# File 'lib/rundoc/code_command/website/navigate.rb', line 16

def call(env = {})
  puts "website.navigate [#{@name}]: #{contents}"
  driver.safe_eval(contents, env)
  ""
end

#driverObject



8
9
10
# File 'lib/rundoc/code_command/website/navigate.rb', line 8

def driver
  @driver ||= Rundoc::CodeCommand::Website::Driver.find(@name)
end

#hidden?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/rundoc/code_command/website/navigate.rb', line 22

def hidden?
  true
end

#not_hidden?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/rundoc/code_command/website/navigate.rb', line 26

def not_hidden?
  !hidden?
end

#to_md(env = {}) ⇒ Object



12
13
14
# File 'lib/rundoc/code_command/website/navigate.rb', line 12

def to_md(env = {})
  ""
end