Ruby Pocket Reference (Pocket Reference (O'Reilly))
معرفی کتاب «Ruby Pocket Reference (Pocket Reference (O'Reilly))» نوشتهٔ Michael James Fitzgerald، منتشرشده توسط نشر O'Reilly Media در سال 2007. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است. «Ruby Pocket Reference (Pocket Reference (O'Reilly))» در دستهٔ بدون دستهبندی قرار دارد.
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. Ruby Pocket Reference 1 Contents 4 Conventions Used in This Book 8 Comments and Questions 9 Acknowledgments 9 Running Ruby 9 Running the Ruby Interpreter 10 Using a Shebang Line on Unix/Linux 12 Associating File Types on Windows 12 Reserved Words 14 Operators 16 Comments 17 Numbers 18 Variables 18 Local Variables 19 Instance Variables 19 Class Variables 20 Global Variables 20 Constants 20 Parallel Assignment of Variables 20 Symbols 21 Predefined Variables 21 Pseudovariables 24 Global Constants 25 Ranges 26 Methods 26 Parentheses 27 Return Values 27 Method Name Conventions 28 Default Arguments 29 Variable Arguments 29 Aliasing Methods 30 Blocks 30 The yield statement 31 Procs 32 Conditional Statements 34 The if Statement 34 Negation 34 Multiple tests 34 Statement modifier for if 35 The else statement 35 The elsif statement 35 The unless Statement 36 Statement modifier for unless 37 The while Statement 37 Statement modifier for while 38 The until Statement 38 Statement modifier for until 39 The case Statement 39 The for Loop 40 The Ternary Operator 41 Executing Code Before or After a Program 41 Classes 41 Instance Variables 43 Accessors 45 Class Variables 46 Class Methods 47 Singletons 47 Inheritance 49 Load path 49 Public, Private, or Protected 49 Modules and Mixins 51 Files 54 Creating a New File 54 Opening an Existing File 55 ARGV and ARGF 55 Renaming and Deleting Files 56 File Inquiries 57 File Modes and Ownership 58 The IO Class 59 Exception Handling 61 The rescue and ensure Clauses 62 The raise Method 62 The catch and throw Methods 63 Object Class 63 Object Instance Methods 64 Kernel Module 69 Sprintf flags and field types 75 String Class 79 Expression Substitution 80 General Delimited Strings 80 Here Documents 80 Escape Characters 82 Character Encoding 82 Regular Expressions 83 String Methods 88 String class methods 89 String instance methods 89 String unpack directives 99 Array Class 101 Creating Arrays 101 Array Class Methods 103 Array Instance Methods 103 Array pack directives 109 Hash Class 113 Creating Hashes 114 Hash Class Methods 115 Hash Instance Methods 115 Time Formatting Directives 120 Interactive Ruby (irb) 121 Ruby Debugger 124 Ruby Documentation 126 RDoc Options 128 RubyGems 132 Rake 138 Ruby Resources 140 Glossary 141 Index 158 Ruby Pocket Reference......Page 1 Contents......Page 4 Conventions Used in This Book......Page 8 Running Ruby......Page 9 Running the Ruby Interpreter......Page 10 Associating File Types on Windows......Page 12 Reserved Words......Page 14 Operators......Page 16 Comments......Page 17 Variables......Page 18 Instance Variables......Page 19 Parallel Assignment of Variables......Page 20 Predefined Variables......Page 21 Pseudovariables......Page 24 Global Constants......Page 25 Methods......Page 26 Return Values......Page 27 Method Name Conventions......Page 28 Variable Arguments......Page 29 Blocks......Page 30 The yield statement......Page 31 Procs......Page 32 Multiple tests......Page 34 The elsif statement......Page 35 The unless Statement......Page 36 The while Statement......Page 37 The until Statement......Page 38 The case Statement......Page 39 The for Loop......Page 40 Classes......Page 41 Instance Variables......Page 43 Accessors......Page 45 Class Variables......Page 46 Singletons......Page 47 Public, Private, or Protected......Page 49 Modules and Mixins......Page 51 Creating a New File......Page 54 ARGV and ARGF......Page 55 Renaming and Deleting Files......Page 56 File Inquiries......Page 57 File Modes and Ownership......Page 58 The IO Class......Page 59 Exception Handling......Page 61 The raise Method......Page 62 Object Class......Page 63 Object Instance Methods......Page 64 Kernel Module......Page 69 Sprintf flags and field types......Page 75 String Class......Page 79 Here Documents......Page 80 Character Encoding......Page 82 Regular Expressions......Page 83 String Methods......Page 88 String instance methods......Page 89 String unpack directives......Page 99 Creating Arrays......Page 101 Array Instance Methods......Page 103 Array pack directives......Page 109 Hash Class......Page 113 Creating Hashes......Page 114 Hash Instance Methods......Page 115 Time Formatting Directives......Page 120 Interactive Ruby (irb)......Page 121 Ruby Debugger......Page 124 Ruby Documentation......Page 126 RDoc Options......Page 128 RubyGems......Page 132 Rake......Page 138 Ruby Resources......Page 140 Glossary......Page 141 Index......Page 158 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. Offers explanations of Ruby's core components, from operators to reserved words to data structures to method syntax, highlighting those features that will be used when coding Ruby. This book contains information on: Reserved words, operators, comments, numbers, variables, ranges, and symbols; and Predefined variables and global constants.
دانلود کتاب Ruby Pocket Reference (Pocket Reference (O'Reilly))