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
  • 78,473
  • 57
  • 200
  • 338
Lennie
  • 10,605
  • 5
  • 22
  • 13

3 Answers3

8

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

Christopher Perry
  • 38,891
  • 43
  • 145
  • 187
Josh Rickard
  • 1,593
  • 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
  • 113,588
  • 46
  • 195
  • 237
0

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

neofetter
  • 3,004
  • 2
  • 26
  • 26