Ruby Phrasebook and over one million other books are available for Amazon Kindle. Learn more


or
Sign in to turn on 1-Click ordering.
or
Amazon Prime Free Trial required. Sign up when you check out. Learn More
Kindle Edition
 
   
More Buying Choices
Have one to sell? Sell yours here
Ruby Phrasebook
 
 
Start reading Ruby Phrasebook on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Ruby Phrasebook [Paperback]

Jason D. Clinton (Author)
4.0 out of 5 stars  See all reviews (1 customer review)

List Price: $19.99
Price: $12.40 & eligible for FREE Super Saver Shipping on orders over $25. Details
You Save: $7.59 (38%)
  Special Offers Available
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.
Only 1 left in stock--order soon (more on the way).
Want it delivered Monday, January 30? Choose One-Day Shipping at checkout. Details
Textbook Student FREE Two-Day Shipping for Students. Learn more

Formats

Amazon Price New from Used from
Kindle Edition $7.20  
Paperback $12.40  

Book Description

0672328976 978-0672328978 September 4, 2008 1

Ruby Phrasebook

 

Jason Clinton

 

Essential Code and Commands

 

Ruby Phrasebook gives you the code you need to quickly and effectively work with Ruby, one of the fastest-growing languages in the world thanks to popular new Ruby technologies like Ruby on Rails.

 

Concise and Accessible

Easy to carry and easy to use–lets you ditch all those bulky books for one portable pocket guide

 

Flexible and Functional

Packed with more than 100 customizable code snippets–so you can readily code functional Ruby in just about any situation

 

Jason Clinton uses Ruby daily in system administration and development for Advanced Clustering Technologies, a Linux Beowulf cluster integrator. He has been working in the computer industry for more than a decade and is actively involved in the Kansas City Ruby Users Group (KCRUG), serving as administrator of the group’s web site and mailing list.

 

Register your book at informit.com/register for convenient access to downloads, updates, and corrections as they become available.

 

Programming / Ruby

 

$16.99 USA / $18.99 CAN / £10.99 Net UK


Special Offers and Product Promotions

  • Buy $50 in qualifying physical textbooks, get $5 in Amazon MP3 Credit. Here's how (restrictions apply)

Frequently Bought Together

Ruby Phrasebook + Python Phrasebook + JavaScript Phrasebook
Price For All Three: $39.99

Show availability and shipping details

Buy the selected items together
  • In Stock.
    Ships from and sold by Amazon.com.
    Eligible for FREE Super Saver Shipping on orders over $25. Details

  • Python Phrasebook $14.28

    In Stock.
    Ships from and sold by Amazon.com.
    Eligible for FREE Super Saver Shipping on orders over $25. Details

  • JavaScript Phrasebook $13.31

    In Stock.
    Ships from and sold by Amazon.com.
    Eligible for FREE Super Saver Shipping on orders over $25. Details


Customers Who Bought This Item Also Bought


Editorial Reviews

About the Author

Jason Clinton has been working in the computerindustry for more than a decade. He is actively involved in the Kansas City Ruby Users Group (KCRUG), serving as administrator of the group’s website and mailing list, and he teaches a community class on Linux at University of Missouri-Kansas City.

 

Clinton uses Ruby daily in system administration and development for Advanced Clustering Technologies, a Linux Beowulf cluster integrator.

Excerpt. © Reprinted by permission. All rights reserved.

Introduction

Introduction

Audience

You can find some great Ruby books on the market. If you are new to Ruby, a friend or someone on the Internet has probably already listed some favorite Ruby books—and you should buy those books. But every book has its niche: Each attempts to appeal to a certain need of a programmer.

It is my belief that the best thing this book can do for you is show you the code. I promise to keep the chat to a minimum, to focus instead on the quality and quantity of actual Ruby code. I'll also keep as much useful information in as tight a space as is possible.

Unlike any other book on the market at the time of this writing, this book is intended to be a (laptop-bag) "pocket-size" resource that enables you to quickly look up a topic and find examples of practical Ruby code—a topical quick reference, if you will. In each of the topics covered, I try to provide as thorough an approach to each task as the size allows for; there's not as much room for coverage of topical solutions as there is in much larger books with similar goals, such as The Ruby Way, 2nd Edition (Sams, 2006), by Hal Fulton. Because of this, other issues that are often given equal priority are relegated to second. For instance, this is not a tutorial; the code samples have some explanation, but I assume that you have a passing familiarity with the language. Also, when possible, I try to point out issues related to security and performance, but I make no claim that these are my highest priority.

I hope that you find this book a useful tool that you keep next to your keyboard whenever you are phrase-mongering in Ruby.

How to Use This Book

I have not intended for this book to be read cover to cover. Instead, you should place your bookmark at the Table of Contents so you can open the book, find the topic you are programming on at the moment, and go immediately to a description of all the issues you might run into.

The content in the book is arranged by topic instead of Ruby class. The benefit is that you can go to one place in this book instead of four or five areas in Ruby's own documentation. (Not that there's anything wrong with Ruby's documentation. It's just that sometimes you are working with several classes at a time and, because Ruby's docs are arranged by class, you have to jump around a lot.)

Conventions

Phrases throughout the book are put in dark gray boxes at the beginning of every topic.

Phrases look like this.

Code snippets that appear in normal text are in italics. All other code blocks, samples, and output appear as follows:

# code sample boxes.

Parentheses are optional in Ruby in some cases—the rule is: you must have parentheses in your method call if you are calling another function in your list of parameters, or passing a literal code block to the method. In all other cases, parentheses are optional. Personally, I'm a sucker for consistency but one of the indisputable strengths of Ruby is the flexibility of the syntax.

In an attempt to have consistency between this book and others, I will (reluctantly) use .class_method() to refer to class methods, ::class_variable to refer to class variables, #method() to refer to instance methods, and finally #var to refer to instance variables. When referring to variables and methods which are members of the same class, I'll use the appropriate @variable and @@class_varriable.

I know that some people might find these two rules annoying—especially those coming from languages that use the '::' and '.' notation everywhere. In all practicality, you will never be so consistent—and rightfully so. One of Ruby's strengths is that there is a ton of flexibility. In fact, this flexibility has helped make Ruby on Rails so popular. This allowed the creators of Rails to make what appears to be a domain-specific language (a language well-suited for a specific kind of work) for web development. But really, all that is going on is a variation on Ruby syntax. And this is one of the many reasons that Ruby is more suitable for a given problem than, say, Python. Python's rigidity ("there should be one—and preferably only one—obvious way to do it") doesn't lend itself to DSL, so the programmers in that language are forced to use other means (which might or might not turn out to be unpleasant).

I always use single quotes (') in Ruby code unless I actually want to make use of the double-quote (")features (interpolation and substitution).

I always put the result of the evaluation of the statement (or block) on the next line with a proceeding #=>, similar to what you would find if you were using irb or browsing Ruby's documentation.

Comments on executable lines of code start with # and are in italics to the end of the comment. Comments on #=> lines are in parentheses and are in italics.

Acknowledgments

Without the Pragmatic Programmers' freely available 1st Edition of Programming Ruby, I would have never discovered the wonderful world of Ruby. The Pickaxe books and the great Ruby community are what make projects like this one possible.

Thanks to my loving partner, Brandon S. Ward, for his infinite patience while working on this book.

Reporting Errata

Readers will almost certainly find topics that they wish were covered which we were overlooked when planning this book. I encourage you to please contact us and let us know what you would like to see included in later editions. Criticisms are also welcome. Contact information can be found in the front-matter of this book.


© Copyright Pearson Education. All rights reserved.


Product Details

  • Paperback: 224 pages
  • Publisher: Addison-Wesley Professional; 1 edition (September 4, 2008)
  • Language: English
  • ISBN-10: 0672328976
  • ISBN-13: 978-0672328978
  • Product Dimensions: 6.9 x 4.4 x 0.5 inches
  • Shipping Weight: 6.4 ounces (View shipping rates and policies)
  • Average Customer Review: 4.0 out of 5 stars  See all reviews (1 customer review)
  • Amazon Best Sellers Rank: #426,858 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, read author blogs, and more.

 

Customer Reviews

1 Review
5 star:    (0)
4 star:
 (1)
3 star:    (0)
2 star:    (0)
1 star:    (0)
 
 
 
 
 
Average Customer Review
4.0 out of 5 stars (1 customer review)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

2 of 3 people found the following review helpful:
4.0 out of 5 stars Good guide., October 27, 2008
By 
K. Lind (Massachusetts, USA) - See all my reviews
(REAL NAME)   
This review is from: Ruby Phrasebook (Paperback)
If you do not know Ruby at all, this is not a great starting place. If you just can't remember how to create a thread, as an example, this is a VERY handy reference.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Share your thoughts with other customers: Create your own review
 
 
 
Only search this product's reviews



Inside This Book (learn more)
Key Phrases - Statistically Improbable Phrases (SIPs): (learn more)
replacing substrings, serializing objects, rational numbers, preceding code sample
Key Phrases - Capitalized Phrases (CAPs): (learn more)
Hello World, Rapid Applications Development, Snake Eye, Searching Strings, Synchronizing Thread Communication, Converting Between Types, Sanitizing Input, Returning Tabled Results, Using Qt Designer, Manipulating Text
Browse Sample Pages:
Front Cover | Table of Contents | First Pages | Index | Back Cover | Surprise Me!
Search Inside This Book:

Citations (learn more)
1 book cites this book:

What Other Items Do Customers Buy After Viewing This Item?


Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 

Your tags: Add your first tag
 

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Active discussions in related forums
Search Customer Discussions
Search all Amazon discussions
   
Related forums



So You'd Like to...


Create a guide


Look for Similar Items by Category


Look for Similar Items by Subject