Research Catalog

Everyday scripting with Ruby : for teams, testers, and you / Brian Marick.

Title
Everyday scripting with Ruby : for teams, testers, and you / Brian Marick.
Author
Marick, Brian.
Publication
Raleigh, N.C. : Pragmatic Programmers, c2006.

Items in the Library & Off-site

Filter by

1 Item

StatusFormatAccessCall NumberItem Location
TextRequest in advance QA76.73.R83 M36 2006Off-site

Details

Description
xiii, 301 p. : ill.; 23 cm.
Series Statement
  • Pragmatic programmers
  • Facets of Ruby series
Uniform Title
  • Pragmatic programmers.
  • Facets of Ruby series.
Subject
  • Ruby (Computer program language)
  • Scripting languages (Computer science)
Note
  • Includes index.
Processing Action (note)
  • committed to retain
Contents
Machine derived contents note: 1 Introduction 1 -- 1.1 How the Book Works 3 -- 1.2 An Outline of the Book 4 -- 1.3 Service After the Sale 5 -- 1.4 Supplements 6 -- 1.5 Acknowledgments 6 -- 2 Getting Started 7 -- 2.1 Download the Practice Files 7 -- 2.2 In the Beginning Was the Command Line 8 -- 2.3 Do You Need to Install Ruby? 10 -- 2.4 Installing Ruby 10 -- 2.5 Your Two Basic Tools 11 -- 2.6 Prompts, Command Lines, Prompts, and irb 12 -- 2.7 It's Time to Make Mistakes 14 -- I The Basics 17 -- 3 A First Script: Comparing File Inventories 19 -- 3.1 A Script in Action 19 -- 3.2 The Ruby Universe 20 -- 3.3 Objects Send and Receive Messages 20 -- 3.4 Variables Name Objects 22 -- 3.5 Comparing Arrays 23 -- 3.6 Printing to the Screen 24 -- 3.7 Making a Script 25 -- 3.8 Where Do We Stand? 27 -- 3.9 Exercises 27 -- 4 Ruby Facts: Arrays 29 -- 5 Three Improvements and a Bug Fix 33 -- 5.1 Command-line Arguments 33 -- 5.2 Ignoring Case 35 -- 5.3 Methods 39 -- 5.4 Dissecting Strings 41 -- 5.5 Fixing a Bug 43 -- 5.6 Where Do We Stand? 45 -- 5.7 Prelude to the Exercises 46 -- 5.8 Exercises 48 -- 6 Ruby Facts: If, Equality Testing, and Unless 51 -- 6.1 if elsif else 51 -- 6.2 When Are Objects Equal? 53 -- 6.3 A Shorthand Version of if 53 -- 6.4 unless 54 -- 6.5 The Question Mark Operator 54 -- II Growing a Script $7 -- 7 The Churn Project: Writing Scripts without Fuss $9 -- 7.1 The Project 59 -- 7.2 Building a Solution 61 -- 7.3 Where Do We Stand? 83 -- 7.4 Exercises 83 -- 8 Ruby Facts: Booleans $7 -- 8.1 Other Boolean Operators 87 -- 8.2 Precedence 87 -- 8.3 Every Object Is a Truth Value 89 -- 8.4 Boolean Expressions Can Select Objects 89 -- 9 Our Friend, the Regular Expression 91 -- 9.1 Regular Expressions Match Strings 92 -- 9.2 Dissecting Strings with Regular Expressions 94 -- 9.3 Reordering an Array 95 -- 9.4 Where Do We Stand? 97 -- 9.5 Exercises 97 -- 10 Ruby Facts: Regular Expressions 99 -- 10.1 Special Characters 99 -- 10.2 Grouping and Alternatives 101 -- 10.3 Taking Strings Apart 101 -- 10.4 Variables Behind the Scenes 102 -- 10.5 Regular Expression Options 102 -- 10.6 Wait, There's More 103 -- 10.7 Exercises 103 -- 11 Classes Bundle Data and Methods 105 -- 11.1 Classes Define Methods 107 -- 11.2 Objects Contain Data 108 -- 11.3 Where Do We Stand? 112 -- 11.4 Exercises 112 -- 12 Ruby Facts: Classes (with a Side Order of Symbols) 119 -- 12.1 Defining Accessors 119 -- 12.2 Self 122 -- 12.3 Class Methods 126 -- 12.4 Class Variables and Globals 129 -- 12.5 Exercises 129 -- III Working in a World Full of People 131 -- 13 Scraping Web Pages with Regular Expressions 133 -- 13.1 Treating Web Pages Like Files 134 -- 13.2 Restricting Attention to Part of the Page 136 -- 13.3 Plucking Out the Title and Authors 138 -- 13.4 Hashes Store Named Data 140 -- 13.5 Taking the Trip 141 -- 13.6 Exercise Yourself 143 -- 14 Other Ways of Working with Web Applications 147 -- 14.1 Handling XHTML 147 -- 14.2 Driving the Browser 149 -- 14.3 Direct Access to Underlying Protocols 150 -- 15 Working with Comma-Separated Values 1.53 -- 15.1 The CSVLibrary 154 -- 15.2 Using Blocks for Automatic Cleanup 154 -- 15.3 More CSV Operations 55 -- 15.4 Applying It All to affinity-trip.rb 155 -- 15.5 Discovering and Understanding Classes in the Standard -- Library 156 -- 15.6 Replacing Code with Data 158 -- 16 Ruby Facts: Hashes 161 -- 17 Ruby Facts: Argument Lists 165 -- 17.1 Optional Arguments 165 -- 17.2 Rest Arguments 166 -- 17.3 Keyword Arguments 167 -- 18 Downloading Helper Scripts and Applications 171 -- 18.1 Finding Packages 171 -- 18.2 Using setup.rb 172 -- 18.3 Using RubyGems 173 -- 18.4 Understanding What You've Downloaded 175 -- 19 A Polished Script 177 -- 19.1 The Load Path 178 -- 19.2 Avoiding Filename Clashes 178 -- 19.3 Avoiding Class Name Clashes Using Modules 19 -- 19.4 A Script to Do the Work for You 181 -- 19.5 Working Without Stepping on Yourself 184 -- 19.6 The rakefile 185 -- 19.7 Location-independent Tests 188 -- 19.8 Exercises 190 -- 20 Ruby Facts: Modules 193 -- 20.1 Nested Modules 194 -- 20.2 Including Modules 195 -- 20.3 Classes Are Modules 197 -- 21 When Scripts Run into Problems 1991 -- 21.1 Use Exceptions to Report Problems 200 -- 21.2 An Error-handling Strategy 200 -- 21.3 Your Exception-handling Options 202 -- 21.4 Methods That Use Blocks 206 -- 21.5 Exercises 208 -- IV The Accomplished Scripter 211 -- 22 Frameworks: Scripting by Filling in Blanks 213 -- 22.1 Using the watchdog Script 214 -- 22.2 Inheritance 217 -- 22.3 Gathering User Choices 223 -- 23 Discovery Is Safer Than Creation 231 -- 23.1 The Story of Barker 232 -- 23.2 What Happens Where? 235 -- 23.3 Modules Instead of Superclasses 240 -- 24 Final Thoughts 243 -- V The Back of the Book 245 -- A Glossary 247 -- B Solutions to Exercises 259 -- B.1 Solutions for Chapter3 259 -- B.2 Solutions for Chapter5 261 -- B.3 Solutions for Chapter 7 264 -- B.4 Solutions for Chapter 9 268 -- B.5 Solutions for Chapter 10 272 -- B.6 Solutions for Chapter 11 273 -- B.7 Solutions for Chapter 12 284 -- B.8 Solutions for Chapter 21 289 -- C Bibliography 291.
ISBN
  • 0977616614
  • 9780977616619
LCCN
^^2007296243
OCLC
  • 80949086
  • SCSB-10371025
Owning Institutions
Harvard Library