Class: RundocCommand

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

Constant Summary

Constants inherited from Rundoc::CodeCommand

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

#hidden?, #not_hidden?, #push

Constructor Details

#initialize(contents = "") ⇒ RundocCommand

Returns a new instance of RundocCommand.



4
5
6
# File 'lib/rundoc/code_command/rundoc_command.rb', line 4

def initialize(contents = "")
  @contents = contents
end

Instance Method Details

#call(env = {}) ⇒ Object



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

def call(env = {})
  puts "Running: #{contents}"
  eval(contents) # rubocop:disable Security/Eval
  ""
end

#to_md(env = {}) ⇒ Object



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

def to_md(env = {})
  ""
end