Sha256: 782faf71ad715c94d1ebebfb14e01938680eb8492f1cfbb77f303647b0848a5c
Contents?: true
Size: 812 Bytes
Versions: 5
Compression:
Stored size: 812 Bytes
Contents
<% begin %> <% irb = IRB::Irb.new nil, StringInputMethod.new(script + "\n") %> <% IRB.conf[:MAIN_CONTEXT] = irb.context %> <% IRB.conf[:OUTPUT] = [] %> <% begin %> <% irb.eval_input %> <% IRB.Output.each do |key, line| %> <% case key %> <% when :stdin %> <p class="text-info"><%= h line %></p> <% when :stdout %> <p><%= h line %></p> <% when :stderr %> <p class="text-danger"><%= h line %></p> <% end %> <% end %> <% rescue => error %> <p class="text-danger"><%= h error.class %>: <%= h error.message %></p> <% error.backtrace.each do |backtrace| %> <p class="text-danger"> <%= h backtrace %></p> <% end %> <% end %> <% rescue => error %> <%= erb :error, locals: { error: error }, layout: false %> <% end %>
Version data entries
5 entries across 5 versions & 1 rubygems