Ruby Pocket Reference [NOOK Book]

Overview

Although Ruby is an easy language to learn, in the heat of action you may find that you can't remember the correct syntax for a conditional or the name of a method. This handy pocket reference offers brief yet clear explanations of Ruby's core components, from operators to reserved words to data structures to method syntax, highlighting those key features that you'll likely use every day when coding Ruby.

Whether you've come to Ruby because of...

See more details below
Ruby Pocket Reference

Available on NOOK devices and apps  
  • NOOK Devices
  • Samsung Galaxy Tab 4 NOOK 7.0
  • Samsung Galaxy Tab 4 NOOK 10.1
  • NOOK HD Tablet
  • NOOK HD+ Tablet
  • NOOK eReaders
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac
  • NOOK for Web

Want a NOOK? Explore Now

NOOK Book (eBook)
$6.99
BN.com price
(Save 12%)$7.99 List Price

Overview

Although Ruby is an easy language to learn, in the heat of action you may find that you can't remember the correct syntax for a conditional or the name of a method. This handy pocket reference offers brief yet clear explanations of Ruby's core components, from operators to reserved words to data structures to method syntax, highlighting those key features that you'll likely use every day when coding Ruby.

Whether you've come to Ruby because of the Rails web development framework --Ruby's killer app -- or simply because it's a relatively clean, powerful and expressive language that's useful for a lot of applications, the Ruby Pocket Reference is organized to help you find what you need quickly. This book not only will get you up to speed on how Ruby works, it provides you with a handy reference you can use anywhere, anytime.

In this book, you find essential information on:

  • Reserved words, operators, comments, numbers, variables, ranges, and symbols
  • Predefined variables andglobal constants
  • Conditional statements, method use, classes, and modules (mixins)
  • Lists of methods from the Object, String, Array, and Hash classes and the Kernel module
  • sprintf andtime formatting directories
  • Interactive Ruby (irb) and the Ruby debugger
  • Ruby documentation
You also get information on the RubyGems package utility and Rake, a build tool similar to make.. If you're using Ruby daily and just want the facts-fast-Ruby Pocket Reference is your book.
Read More Show Less

Product Details

  • ISBN-13: 9780596551742
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 7/18/2007
  • Series: Pocket Reference (O'Reilly)
  • Sold by: Barnes & Noble
  • Format: eBook
  • Edition number: 1
  • Pages: 178
  • File size: 2 MB

Meet the Author

Michael Fitzgerald is Principal at Overdue Books LLC, a publishing and writing firm. He is the author of Learning Ruby, Ruby Pocket Reference, XML Pocket Reference, Third Edition with Simon St. Laurent, XML Hacks, and Learning XSLT, all published by O'Reilly. He is also the author of Building B2B Applications with XML: A Resource Guide and XSL Essentials (both by John Wiley & Sons). His books have been translated into Spanish, French, German, Japanese, and Chinese. He has also been a regular contributor to XML.com. Michael likes to ski (downhill and cross country), ride and train horses, and spend time with his family.

Read More Show Less

Table of Contents


Running Ruby     2
Running the Ruby Interpreter     3
Using a Shebang Line on Unix/Linux     5
Associating File Types on Windows     5
Reserved Words     7
Operators     9
Comments     10
Numbers     11
Variables     11
Local Variables     12
Instance Variables     12
Class Variables     13
Global Variables     13
Constants     13
Parallel Assignment of Variables     13
Symbols     14
Predefined Variables     14
Pseudovariables     17
Global Constants     18
Ranges     19
Methods     19
Parentheses     20
Return Values     20
Method Name Conventions     21
Default Arguments     22
Variable Arguments     22
Aliasing Methods     23
Blocks     23
Procs     25
Conditional Statements     27
The if Statement     27
The unless Statement     29
The while Statement     30
The untilStatement     31
The case Statement     32
The for Loop     33
The Ternary Operator     34
Executing Code Before or After a Program     34
Classes     34
Instance Variables     36
Accessors     38
Class Variables     39
Class Methods     40
Singletons     40
Inheritance     42
Public, Private, or Protected     42
Modules and Mixins     44
Files     47
Creating a New File     47
Opening an Existing File     48
ARGV and ARGF     48
Renaming and Deleting Files     49
File Inguiries     50
File Modes and Ownership     51
The 10 Class     52
Exception Handling     54
The rescue and ensure Clauses     55
The raise Method     55
The catch and throw Methods     56
Object Class     56
Object Instance Methods     57
Kernel Module     62
String Class     72
Expression Substitution     73
General Delimited Strings     73
Here Documents     73
Escape Characters     75
Character Encoding     75
Regular Expressions     76
String Methods     81
Array Class     94
Creating Arrays     94
Array Class Methods     96
Array Instance Methods     96
Hash Class     106
Creating Hashes     107
Hash Class Methods     108
Hash Instance Methods     108
Time Formatting Directives     113
Interactive Ruby (irb)     114
Ruby Debugger     117
Ruby Documentation     119
RDoc Options     121
RubyGems     125
Rake     131
Ruby Resources     133
Glossary     134
Index     151
Read More Show Less

Customer Reviews

Average Rating 5
( 1 )
Rating Distribution

5 Star

(1)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing 1 Customer Reviews
  • Anonymous

    Posted January 5, 2011

    No text was provided for this review.

Sort by: Showing 1 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)