class Rundoc::CodeCommand

Generic CodeCommand class to be inherited

Attributes

command[RW]
contents[RW]
keyword[RW]
original_args[RW]
render_command[RW]
render_command?[RW]
render_result[RW]
render_result?[RW]

Public Class Methods

new(*args) click to toggle source
# File lib/rundoc/code_command.rb, line 12
def initialize(*args)
end

Public Instance Methods

<<(contents)
Alias for: push
call(env = {}) click to toggle source

Executes command to build project Is expected to return the result of the command

# File lib/rundoc/code_command.rb, line 31
def call(env = {})
  raise "not implemented on #{self.inspect}"
end
hidden?() click to toggle source
# File lib/rundoc/code_command.rb, line 15
def hidden?
  !render_command? && !render_result?
end
not_hidden?() click to toggle source
# File lib/rundoc/code_command.rb, line 19
def not_hidden?
  !hidden?
end
push(contents) click to toggle source
# File lib/rundoc/code_command.rb, line 23
def push(contents)
  @contents ||= ""
  @contents << contents
end
Also aliased as: <<
to_md(env = {}) click to toggle source

the output of the command, i.e. `$ cat foo.txt`

# File lib/rundoc/code_command.rb, line 36
def to_md(env = {})
  raise "not implemented on #{self.inspect}"
end