BVB Source Codes

hologram Show example.rb Source code

Return Download hologram: download example.rb Source code - Download hologram Source code - Type:.rb
  1. module Hologram
  2.   module CodeExampleRenderer
  3.     class Example < Struct.new(:code)
  4.       def rendered_example
  5.         code
  6.       end
  7.  
  8.       def code_example
  9.         formatter.format(lexer.lex(code)).strip
  10.       end
  11.  
  12.       def get_binding
  13.         binding
  14.       end
  15.  
  16.       private
  17.  
  18.       def formatter
  19.         @_formatter ||= Rouge::Formatters::HTML.new(wrap: false)
  20.       end
  21.  
  22.       def lexer
  23.         @_lexer ||= Rouge::Lexer.find_fancy('guess', code)
  24.       end
  25.     end
  26.   end
  27. end
  28.  
downloadexample.rb Source code - Download hologram Source code
Related Source Codes/Software:
www.html5rocks.com - ....a top-notch resource for web developer 2017-05-12
MTStatusBarOverlay - A custom iOS status bar overlay seen in Apps like ... 2017-05-12
blueprint - Reverse engineer server configuration ... 2017-05-12
PullToRefresh - A simple iPhone TableViewController for adding the... 2017-05-12
mrjob - Run MapReduce jobs on Hadoop or Amazon Web Service... 2017-05-11
isso - a Disqus alternative https:... 2017-05-12
python3-cookbook - "The Python Cookbook" 3 rd Edition Translatio 2017-05-12
TSA-Travel-Sentry-master-keys - 3D reproduction of TSA Master key 2017-05-12
fatfree - A powerful yet easy-to-use PHP micro-framework des... 2017-05-13
rolify - Role management library with the resource scoping 2017-05-13
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top