hubot-note
Version:
hubot note taking script
27 lines (19 loc) • 465 B
text/coffeescript
class Note
constructor: (title, start_at) ->
= start_at
= null
= []
= title
addLine: (line) ->
.push(line)
getText: (line_num) ->
if line_num
start_pos = Math.max(0, .length - line_num)
return .slice(start_pos).join("\n")
else
return .join("\n")
setEnd: (end_at) ->
= end_at
isEnd: ->
return != null
module.exports.Note = Note