Class: Guard::RSpectacle::Humanity

Inherits:
Object
  • Object
show all
Defined in:
lib/guard/rspectacle/humanity.rb

Overview

The humanity class helps to bring some randomness into the so boring and static messages from rspectacle.

Class Method Summary collapse

Class Method Details

.failureString

Picks a random failure message.

Returns:

  • (String)

    a failure message



41
42
43
44
45
46
47
48
49
# File 'lib/guard/rspectacle/humanity.rb', line 41

def failure
  pick [
           'Try harder, failing.',
           'Failing, not there yet...',
           'Ups, you did it again.',
           'Nope.',
           'Still red.'
       ]
end

.pendingString

Picks a random pending message.

Returns:

  • (String)

    a pending message



29
30
31
32
33
34
35
# File 'lib/guard/rspectacle/humanity.rb', line 29

def pending
  pick [
           'Almost there!',
           'Final spurt!',
           'One more please!'
       ]
end

.successString

Picks a random success message.

Returns:

  • (String)

    a success message



14
15
16
17
18
19
20
21
22
23
# File 'lib/guard/rspectacle/humanity.rb', line 14

def success
  pick [
           'How cool, all works!',
           'Awesome, all passing!',
           'Well done, mate!',
           'You rock!',
           'Good job!',
           'Yep!'
       ]
end