Module: Slacktail::HasText

Included in:
Attachment, Message
Defined in:
lib/slacktail/has_text.rb

Instance Method Summary collapse

Instance Method Details

#textObject



3
4
5
# File 'lib/slacktail/has_text.rb', line 3

def text
  @text ||= text!
end

#text!Object



7
8
9
# File 'lib/slacktail/has_text.rb', line 7

def text!
  data.text ? data.text.gsub(/```\n?/, '').strip : ''
end

#text_linesObject



11
12
13
# File 'lib/slacktail/has_text.rb', line 11

def text_lines
  text.split "\n"
end