Sha256: 08a65218aa38953211bbd97c0b2b1c88bcc725f9d02a535c2393550e6f07d9db
Contents?: true
Size: 405 Bytes
Versions: 4
Compression:
Stored size: 405 Bytes
Contents
module XCPretty class Syntax def self.highlight(code, options="") pygments_available? ? pygmentize(code, options) : code end private def self.pygments_available? @available = system('which pygmentize > /dev/null') if @available.nil? @available end def self.pygmentize(code, options) `echo "#{code}" | pygmentize -l objc #{options}` end end end
Version data entries
4 entries across 4 versions & 2 rubygems
Version | Path |
---|---|
learn-xcpretty-0.1.12 | lib/xcpretty/syntax.rb |
learn-xcpretty-0.1.11 | lib/xcpretty/syntax.rb |
xcpretty-0.1.7 | lib/xcpretty/syntax.rb |
xcpretty-0.1.6 | lib/xcpretty/syntax.rb |