读书人

Ruby自学札记:类型对象

发布时间: 2012-12-28 10:29:05 作者: rapoo

Ruby自学笔记:类型,对象
一. 注释

单行注释

# This entire line is a commentx = "#This is a string"               # And this is a commenty = /#This is a regular expression/   # Here's another comment


多行注释

=begin Someone needs to fix the broken code below!    <emphasis>Any code here is commented out</emphasis>=end


文档注释

# Rdoc comments use a simple markup grammar like those used in wikis. # Separate paragraphs with a blank line.# # = Headings# # Headings begin with an equals sign# # == Sub-Headings# The line above produces a subheading.# === Sub-Sub-Heading# And so on.


阅读全文

读书人网 >Ruby Rails

热点推荐