Share Ruby scripts, Rails controller code, or Enumerable chains: syntax-highlighted and shareable with a single link.
1# Group users by subscription tier and compute summary stats2def subscription_summary(users)3 users4 .group_by(&:plan)5 .transform_values do |group|6 {7 count: group.size,8 revenue: group.sum(&:monthly_revenue),9 churn: group.count { |u| u.churned_at.present? }.fdiv(group.size),10 }11 end12 .sort_by { |_, v| -v[:revenue] }13 .to_h14end1516# Usage17summary = subscription_summary(User.active.includes(:subscriptions))18summary.each do |plan, stats|19 puts "#{plan}: #{stats[:count]} users, $#{stats[:revenue]}/mo"20endPaste Ruby code and get a shareable link with full syntax highlighting, server-side rendered with no JavaScript overhead.
Deleted on first open. Can't be viewed twice.
Add a password for end-to-end encryption with no raw key stored.
Set pastes to expire after 1 hour, 1 day, 7 days, or up to 30 days. Gone when you say so.
No sign-up, no email, no ads. Paste and share in seconds.
For ERB, paste as HTML: it won't highlight Ruby inside ERB tags but the HTML structure will be highlighted.
Pastes up to 5 MB are supported.
Yes. Select Ruby as the language for Gemfile content.