Method: Fat::Color#extract
- Defined in:
- lib/fat/color.rb
#extract(text, pattern, default_color) ⇒ Object
27 28 29 30 31 32 |
# File 'lib/fat/color.rb', line 27 def extract text, pattern, default_color index = text.index pattern return default_color if index.nil? index += pattern.size decode text[index..(index + 6)] end |