Class: Swift::Playground::Util::SyntaxHighlighting
- Inherits:
-
Object
- Object
- Swift::Playground::Util::SyntaxHighlighting
- Defined in:
- lib/swift/playground/util/syntax_highlighting.rb
Class Method Summary collapse
Class Method Details
.available? ⇒ Boolean
8 9 10 11 |
# File 'lib/swift/playground/util/syntax_highlighting.rb', line 8 def available? Gem::Specification::find_all_by_name('github-linguist').any? && Gem::Specification::find_all_by_name('pygments.rb').any? end |
.css(style = 'default') ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/swift/playground/util/syntax_highlighting.rb', line 13 def css(style = 'default') if available? Pygments.css('.highlight', style: style) else '' end end |