<div class="container">
<pre>
<span>def print_hi(name)</span>
<span> puts "Hi, #{name}"</span>
<span>end</span>
<span></span>
<span>print_hi('Tom')</span>
<span>#=> prints 'Hi, Tom' to STDOUT.</span>
</pre>
</div>
body {
background-color: #eee;
color: #555;
}
pre {
font-family: monospace;
background-color: #fff;
width: 27.5em;
margin: 4em auto;
padding: 0.5em;
border-radius: .25em;
box-shadow: 0.1em 0.1em 0.5em rgba(0, 0, 0, 0.45);
line-height: 0;
counter-reset: line;
}
pre span {
display: inline-block;
width:100%;
line-height: 1.5rem;
}
pre span:before {
counter-increment: line;
content: counter(line);
display: inline-block;
border-right: 1px solid #ddd;
padding: 0 .5em;
margin-right: .5em;
color: #888;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.