Add colorize

This commit is contained in:
Joshua Peek
2011-05-20 14:01:12 -05:00
parent cf9dd8f8fd
commit bebae09fde
6 changed files with 55 additions and 0 deletions

View File

@@ -132,5 +132,10 @@ module Linguist
end
end
end
def colorize
return if !text? || large?
lexer.colorize(data)
end
end
end

View File

@@ -77,6 +77,10 @@ module Linguist
!popular?
end
def colorize(text)
lexer.colorize(text)
end
def ==(other)
eql?(other)
end

View File

@@ -1,3 +1,4 @@
require 'albino'
require 'yaml'
module Linguist
@@ -21,6 +22,10 @@ module Linguist
aliases.first
end
def colorize(text)
Albino.colorize(text, to_s)
end
def ==(other)
eql?(other)
end