Class: String

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

Instance Method Summary collapse

Instance Method Details

#blueObject



34
35
36
# File 'lib/twat.rb', line 34

def blue
  "#{self}"
end

#boldObject



42
43
44
# File 'lib/twat.rb', line 42

def bold
  "#{self}"
end

#cyanObject



38
39
40
# File 'lib/twat.rb', line 38

def cyan
  "#{self}"
end

#greenObject



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

def green
  "#{self}"
end

#mentions?(name) ⇒ Boolean

Returns:

  • (Boolean)


46
47
48
# File 'lib/twat.rb', line 46

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?



22
23
24
# File 'lib/twat.rb', line 22

def red
  "#{self}"
end

#yellowObject



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

def yellow
  "#{self}"
end