class FlowdockRails::Message

Create a message you can apply markdown to text multile line text

Attributes

lines[RW]
tags[RW]
text[RW]
thread_id[RW]

Public Class Methods

new(attributes = {}) click to toggle source
# File lib/flowdock_rails/models/message.rb, line 6
def initialize(attributes = {})
  @thread_id = attributes[:thread_id]
  @text = attributes[:text]
  @tags = attributes[:tags] || []
  @lines = attributes[:lines] || []
  @sent = false
end

Public Instance Methods

format_tags() click to toggle source
# File lib/flowdock_rails/models/message.rb, line 14
def format_tags
  @tags.map { |e| '#' + e.to_s }.join(',')
end
sent() click to toggle source
# File lib/flowdock_rails/models/message.rb, line 26
def sent
  @sent = true
end
sent?() click to toggle source
# File lib/flowdock_rails/models/message.rb, line 22
def sent?
  @sent
end
thread?() click to toggle source
# File lib/flowdock_rails/models/message.rb, line 18
def thread?
  !@thread_id.nil?
end