Ruby Pocket Reference (Paperback)

Michael James Fitzgerald

  • 出版商: O'Reilly
  • 出版日期: 2007-07-28
  • 售價: $640
  • 貴賓價: 9.5$608
  • 語言: 英文
  • 頁數: 178
  • 裝訂: Paperback
  • ISBN: 0596514816
  • ISBN-13: 9780596514815
  • 相關分類: Ruby
  • 已絕版

買這商品的人也買了...

商品描述

Description

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.

Table of Contents

Running Ruby 

               Running the Ruby Interpreter 

               Using a Shebang Line on Unix/Linux 

               Associating File Types on Windows 

     Reserved Words 

     Operators 

     Comments 

     Numbers 

     Variables 

               Local Variables 

               Instance Variables 

               Class Variables 

               Global Variables 

               Constants 

               Parallel Assignment of Variables 

     Symbols 

     Predefined Variables 

     Pseudovariables 

     Global Constants 

     Ranges 

     Methods 

               Parentheses 

               Return Values 

               Method Name Conventions 

               Default Arguments 

               Variable Arguments 

               Aliasing Methods 

               Blocks 

               Procs 

     Conditional Statements 

               The if Statement 

               The unless Statement 

               The while Statement 

               The until Statement 

               The case Statement 

               The for Loop 

               The Ternary Operator 

               Executing Code Before or After a Program 

     Classes 

               Instance Variables 

               Accessors 

               Class Variables 

               Class Methods 

               Singletons 

               Inheritance 

               Public, Private, or Protected 

               Modules and Mixins 

     Files 

               Creating a New File 

               Opening an Existing File 

               ARGV and ARGF 

               Renaming and Deleting Files 

               File Inquiries 

               File Modes and Ownership 

     The IO Class 

     Exception Handling 

               The rescue and ensure Clauses 

               The raise Method 

               The catch and throw Methods 

     Object Class 

               Object Instance Methods 

     Kernel Module 

     String Class 

               Expression Substitution 

               General Delimited Strings 

               Here Documents 

               Escape Characters 

               Character Encoding 

               Regular Expressions 

               String Methods 

     Array Class 

               Creating Arrays 

               Array Class Methods 

               Array Instance Methods 

     Hash Class 

               Creating Hashes 

               Hash Class Methods 

               Hash Instance Methods 

     Time Formatting Directives 

     Interactive Ruby (irb) 

     Ruby Debugger 

     Ruby Documentation 

     RDoc Options 

     RubyGems 

     Rake 

     Ruby Resources 

     Glossary 

Index