Project

General

Profile

Actions

Feature #6243

closed

Make ERB Ruby's Super Power

Added by trans (Thomas Sawyer) over 12 years ago. Updated over 12 years ago.

Status:
Rejected
Assignee:
-
Target version:
[ruby-core:44046]

Description

As a Super Ruby Developer
I want to make Ruby Super Developery
Given wimpy Ruby, coding is arduous:

class Letters
def a
"Aa"
end

def b
  "Bb"
end

# Oh, dear St. V! It's just too long. I don't want to go on!

Then Super Ruby saves the day!

class Letters
<%= ('a'...'z').each do |letter| %>
def <%= letter %>
"<%= letter.upcase %><%= letter %>"
end
<% end %>
end

letters = Letters.new

letters.a #=> "Aa"
letters.b #=> "Bb"

Imagine the power of Ruby ** Ruby! It's like putting Ruby in a phone booth and out pops Ruby with big on chest. And like that, Super Ruby destroys all super villain languages like PHP!

And you can't reject b/c this issue is all Gherkin which makes it legit.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0