class Docdown::CodeCommand

Attributes

command[RW]
contents[RW]
hidden[RW]
hidden?[RW]
keyword[RW]
render_result[RW]
render_result?[RW]

Public Class Methods

new(arg) click to toggle source
# File lib/docdown/code_command.rb, line 8
def initialize(arg)

end

Public Instance Methods

<<(contents)
Alias for: push
call() click to toggle source

executes command to build project

# File lib/docdown/code_command.rb, line 28
def call
  raise "not implemented"
end
push(contents) click to toggle source
# File lib/docdown/code_command.rb, line 21
def push(contents)
  @contents ||= ""
  @contents << contents
end
Also aliased as: <<
render() click to toggle source

returns the markedup command do not over-write unless you call super

# File lib/docdown/code_command.rb, line 14
def render
  result = self.call
  return [to_md, result].join("\n")  if render_result?
  return "" if hidden?
  to_md
end