Class: SlackMessaging::RandomMessage

Inherits:
Object
  • Object
show all
Defined in:
lib/slack_messaging/random_message.rb

Constant Summary collapse

MESSAGE_ARRAY =
[
  "A true friend is someone who thinks that you are a good egg even though he knows that you are slightly cracked.\n--Bernard Meltzer",
  "If you can't make it good, at least make it look good.\n--Bill Gates",
  "I'm convinced of this: Good done anywhere is good done everywhere.\n--Maya Angelou",
  "The real trouble with reality is that there's no background music.\n--Anonymous",
  "Whatever you are, be a good one.\n--Abraham Lincoln",
  "Good, better, best. Never let it rest. 'Til your good is better and your better is best.\n--St. Jerome",
  "Despite everything, I believe that people are really good at heart.\n--Anne Frank",
  "Life is 10% what happens to you and 90% how you react to it.\n--Charles R. Swindoll",
  "The way to get started is to quit talking and begin doing.\n--Walt Disney",
  "A creative man is motivated by the desire to achieve, not by the desire to beat others.\n--Ayn Rand",
  "Problems are not stop signs, they are guidelines.\n--Robert H. Schuller",
  "Correction does much, but encouragement does more.\n--Johann Wolfgang von Goethe",
  "Positive anything is better than negative nothing.\n--Elbert Hubbard",
  "To succeed, you need to find something to hold on to, something to motivate you, something to inspire you.\n--Joyce Meyer",
  "If you're not making mistakes, then you're not doing anything. I'm positive that a doer makes mistakes.\n--John Wooden",
  "The best way to deal with other people is to just let them be other people.\n--Anonymous",
  "Talk to yourself like you would to someone you love.\n--Brenee Brown",
  "Don't let small minds convince you that your dreams are too big.\n--Anonymous",
]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRandomMessage

Returns a new instance of RandomMessage.



26
27
28
# File 'lib/slack_messaging/random_message.rb', line 26

def initialize
  self.text = MESSAGE_ARRAY[rand(MESSAGE_ARRAY.length)]
end

Instance Attribute Details

#textObject

Returns the value of attribute text.



3
4
5
# File 'lib/slack_messaging/random_message.rb', line 3

def text
  @text
end

Instance Method Details

#get_textObject



30
31
32
# File 'lib/slack_messaging/random_message.rb', line 30

def get_text
  return self.text
end