Class: String

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

Instance Method Summary collapse

Instance Method Details

#blueObject



28
29
30
# File 'lib/twat.rb', line 28

def blue
  "#{self}"
end

#boldObject



36
37
38
# File 'lib/twat.rb', line 36

def bold
  "#{self}"
end

#cyanObject



32
33
34
# File 'lib/twat.rb', line 32

def cyan
  "#{self}"
end

#greenObject



20
21
22
# File 'lib/twat.rb', line 20

def green
  "#{self}"
end

#mentions?(name) ⇒ Boolean

Returns:

  • (Boolean)


40
41
42
# File 'lib/twat.rb', line 40

def mentions?(name)
  return self.downcase.include?(name.to_s.downcase)
end

#redObject

TODO - It’d be nice to implement the colors support here, maybe even only mix this in if it’s enabled?



16
17
18
# File 'lib/twat.rb', line 16

def red
  "#{self}"
end

#yellowObject



24
25
26
# File 'lib/twat.rb', line 24

def yellow
  "#{self}"
end