Sha256: 2b56eee1de5a1342ba4b049fcf5903c248df9c315c25cac077d4cb6648682e84

Contents?: true

Size: 511 Bytes

Versions: 5

Compression:

Stored size: 511 Bytes

Contents

<% begin %>
  <% binding = Object.new.send :binding %>
  <% script.each_line do |line| %>
    <% next if line.strip.empty? %>
    <p class="text-info">&gt; <%= h line %></p>
    <% begin %>
      <% result = binding.eval(line).inspect %>
      <p>=> <%= h result %></p>
    <% rescue => error %>
      <p class="text-danger"><%= h error.class %>: <%= h error.message %></p>
      <% break %>
    <% end %>
  <% end %>
<% rescue => error %>
  <%= erb :error, locals: { error: error }, layout: false %>
<% end %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
tailog-0.5.1 app/views/script/ruby_debug.erb
tailog-0.5.0 app/views/script/ruby_debug.erb
tailog-0.4.8 app/views/script/ruby_debug.erb
tailog-0.4.7 app/views/script/ruby_debug.erb
tailog-0.4.6 app/views/script/ruby_debug.erb