module Ccp::Commands::Commentable

Public Instance Methods

MEMO(*messages) click to toggle source
# File lib/ccp/commands/commentable.rb, line 4
def MEMO(*messages)
  from = caller.is_a?(Array) ? caller.first : self.class
  receiver.comment("MEMO: #{_build_comment(*messages)}\n  #{from}")
end
TODO(*messages) click to toggle source
# File lib/ccp/commands/commentable.rb, line 9
def TODO(*messages)
  from = caller.is_a?(Array) ? caller.first : self.class
  receiver.comment("TODO: #{_build_comment(*messages)}\n  #{from}", :warn)
end

Private Instance Methods

_build_comment(*objs) click to toggle source
# File lib/ccp/commands/commentable.rb, line 15
def _build_comment(*objs)
  objs = objs.first if objs.size == 1
  objs.is_a?(String) ? objs : objs.inspect
end