学习ruby中记录下的一些要点和感悟,随缘更新
内容来自 《“笨方法”学ruby》、https://www.runoob.com/ ,此处仅做记录
KeyWord
- alias and BEGIN begin break case class def defined? do else elsif END end ensure
- false for if in module next nil nor or redo rescue retry return self super then true
- undef unless until when while yield
复制代码 Data Class
- true false nil constants strings numbers ranges arrays hashes
复制代码 String Formats
- \\ \' " \a \b \n \r \t \v
复制代码 Operators
- :: [] ** -(unary) +(unary) ! ~ * / % + - << >> & | > >= < <= <=> == === != =~ && || .. ...
复制代码 逻辑术语
[table][tr]and和[/tr][tr][td]or[/td][td]或[/td][/tr][tr][td]not[/td][td]非[/td][/tr][tr][td]!=[/td][td]不等于[/td][/tr][tr][td]==[/td][td]等于[/td][/tr][tr][td]>=[/td][td]大于等于[/td][/tr][tr][td] |