Class: RundocCommand
- Inherits:
-
Rundoc::CodeCommand
- Object
- Rundoc::CodeCommand
- RundocCommand
- Defined in:
- lib/rundoc/code_command/rundoc_command.rb
Constant Summary
Constants inherited from Rundoc::CodeCommand
Instance Attribute Summary
Attributes inherited from Rundoc::CodeCommand
#command, #contents, #keyword, #original_args, #render_command, #render_result
Instance Method Summary collapse
- #call(env = {}) ⇒ Object
-
#initialize(contents = "") ⇒ RundocCommand
constructor
A new instance of RundocCommand.
- #to_md(env = {}) ⇒ Object
Methods inherited from Rundoc::CodeCommand
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 |