Component attributes using Ruby

Would you please edit your post according to:
how-to-post-correctly-formatted-and-colorized-code-on-the-forum