class Rundoc::CodeCommand::PrintText

Public Class Methods

new(line) click to toggle source
# File lib/rundoc/code_command/print/text.rb, line 3
def initialize(line)
  @line = line
end

Public Instance Methods

call(env = {}) click to toggle source
# File lib/rundoc/code_command/print/text.rb, line 19
def call(env = {})
  if render_before?
    ""
  else
    [@line, contents].compact.join("\n")
  end
end
hidden?() click to toggle source
# File lib/rundoc/code_command/print/text.rb, line 15
def hidden?
  !render_result?
end
render_before?() click to toggle source
# File lib/rundoc/code_command/print/text.rb, line 27
def render_before?
  !render_command? && render_result?
end
to_md(env) click to toggle source
# File lib/rundoc/code_command/print/text.rb, line 7
def to_md(env)
  if render_before?
    env[:before] << [@line, contents].compact.join("\n")
  end

  ""
end