Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/twat.rb
Instance Method Summary collapse
- #blue ⇒ Object
- #bold ⇒ Object
- #cyan ⇒ Object
- #green ⇒ Object
- #mentions?(name) ⇒ Boolean
-
#red ⇒ Object
TODO - It’d be nice to implement the colors support here, maybe even only mix this in if it’s enabled?.
- #yellow ⇒ Object
Instance Method Details
#blue ⇒ Object
32 33 34 |
# File 'lib/twat.rb', line 32 def blue "[34m#{self}[39m" end |
#bold ⇒ Object
40 41 42 |
# File 'lib/twat.rb', line 40 def bold "[1m#{self}[22m" end |
#cyan ⇒ Object
36 37 38 |
# File 'lib/twat.rb', line 36 def cyan "[36m#{self}[39m" end |
#green ⇒ Object
24 25 26 |
# File 'lib/twat.rb', line 24 def green "[32m#{self}[39m" end |
#mentions?(name) ⇒ Boolean
44 45 46 |
# File 'lib/twat.rb', line 44 def mentions?(name) return self.downcase.include?(name.to_s.downcase) end |
#red ⇒ Object
TODO - It’d be nice to implement the colors support here, maybe even only mix this in if it’s enabled?
20 21 22 |
# File 'lib/twat.rb', line 20 def red "[31m#{self}[39m" end |
#yellow ⇒ Object
28 29 30 |
# File 'lib/twat.rb', line 28 def yellow "[33m#{self}[39m" end |