Class: Rundoc::CodeCommand::Raw

Inherits:
Rundoc::CodeCommand show all
Defined in:
lib/rundoc/code_command/raw.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

#hidden?, #not_hidden?, #push

Constructor Details

#initialize(contents, visible: true) ⇒ Raw

Returns a new instance of Raw.



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

def initialize(contents, visible: true)
  @contents = contents
  @render_result = visible
end

Instance Method Details

#call(env = {}) ⇒ Object



9
10
11
# File 'lib/rundoc/code_command/raw.rb', line 9

def call(env = {})
  contents.to_s
end

#to_md(env = {}) ⇒ Object



13
14
15
# File 'lib/rundoc/code_command/raw.rb', line 13

def to_md(env = {})
  contents.to_s
end