Class: Rundoc::CodeCommand::CommentRunner
- Inherits:
-
Object
- Object
- Rundoc::CodeCommand::CommentRunner
- Defined in:
- lib/rundoc/code_command/comment.rb
Instance Method Summary collapse
- #call(env = {}) ⇒ Object
-
#initialize(user_args:, render_command:, render_result:, io:, contents: nil) ⇒ CommentRunner
constructor
A new instance of CommentRunner.
- #to_md(env = {}) ⇒ Object
Constructor Details
#initialize(user_args:, render_command:, render_result:, io:, contents: nil) ⇒ CommentRunner
Returns a new instance of CommentRunner.
12 13 14 15 16 |
# File 'lib/rundoc/code_command/comment.rb', line 12 def initialize(user_args:, render_command:, render_result:, io:, contents: nil) @io = io @line = user_args&.line @contents = contents end |
Instance Method Details
#call(env = {}) ⇒ Object
18 19 20 21 |
# File 'lib/rundoc/code_command/comment.rb', line 18 def call(env = {}) @io.puts "Skipping command (commented out): # #{@line}\n#{@contents}".strip "" end |
#to_md(env = {}) ⇒ Object
23 24 25 |
# File 'lib/rundoc/code_command/comment.rb', line 23 def to_md(env = {}) "" end |