3

I read that Ruby has a language featured called "labels", how does that work?

Update:

I saw it at http://ruby.about.com/od/gems/qt/shorturl.htm where the author talks about a label at the bottom of the article with:

puts ShortURL.shorten('http://ruby.about.com', :lns)

Andrew Grimm
  • 74,534
  • 52
  • 194
  • 322
Lennie
  • 10,125
  • 5
  • 21
  • 13

3 Answers3

8

Think the author meant to say symbols. You can read about them here, and the docs

Christopher Perry
  • 38,214
  • 42
  • 141
  • 184
Josh Rickard
  • 1,583
  • 2
  • 16
  • 29
0

I've just consulted my "Pickaxe" book and there's no such feature. Could it go by another name?

John Topley
  • 110,534
  • 45
  • 192
  • 237
0

The Rails framework has labels but these are just helpers for the HTML label tag.

ewakened
  • 2,966
  • 2
  • 25
  • 26