Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/slacktail/extensions/string.rb
Instance Method Summary collapse
Instance Method Details
#to_colsole_color ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/slacktail/extensions/string.rb', line 6 def to_colsole_color color = { '000000' => :wht, 'ff0000' => :red, '00ff00' => :grn, '0000ff' => :blu, 'ffff00' => :ylw, 'ff00ff' => :pur, '00ffff' => :cyn, 'ffffff' => :blk, } key = self.downcase color.keys.include?(key) ? color[key] : :rst end |
#to_markdown ⇒ Object
2 3 4 |
# File 'lib/slacktail/extensions/string.rb', line 2 def to_markdown TTY::Markdown.parse self end |