Sha256: 75d343f9ad7941b6c1c86052da9ab3c4655eb1843844337d53de5218424e4586

Contents?: true

Size: 482 Bytes

Versions: 13

Compression:

Stored size: 482 Bytes

Contents

<% begin %>
  <% b = binding %>
  <% script.each_line do |line| %>
    <% next if line.strip.empty? %>
    <p class="text-info">&gt; <%= h line %></p>
    <% begin %>
      <% result = b.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

13 entries across 13 versions & 1 rubygems

Version Path
tailog-0.4.5 app/views/script/ruby.erb
tailog-0.4.3 app/views/script/ruby.erb
tailog-0.4.2 app/views/script/ruby.erb
tailog-0.4.1 app/views/script/ruby.erb
tailog-0.4.0 app/views/script/ruby.erb
tailog-0.3.7 app/views/script/ruby.erb
tailog-0.3.6 app/views/script/ruby.erb
tailog-0.3.5 app/views/script/ruby.erb
tailog-0.3.4 app/views/script/ruby.erb
tailog-0.3.3 app/views/script/ruby.erb
tailog-0.3.2 app/views/script/ruby.erb
tailog-0.3.1 app/views/script/ruby.erb
tailog-0.3.0 app/views/script/ruby.erb