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

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 = Rundoc::CodeCommand::Website::Driver.find(name)
end

Instance Method Details

#call(env = {}) ⇒ Object



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

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

#hidden?Boolean

Returns:

  • (Boolean)


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

def hidden?
  true
end

#not_hidden?Boolean

Returns:

  • (Boolean)


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

def not_hidden?
  !hidden?
end

#to_md(env = {}) ⇒ Object



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

def to_md(env = {})
  ""
end