Ruby: Visual Quickstart Guide

Book description

This book is for those new to programming or that know other programming languages and would like to know Ruby. The book teaches the fundamentals of object-oriented programming and starts with creating a basic program. Everything is covered such as control structures and variables, taking input, and creating output. Moving from the basic to more advanced topics, a solid understanding of Ruby is taught in logical progression. The book ends with an overview of the Web development framework, Ruby on Rails.

Table of contents

  1. Title Page
  2. Copyright Page
  3. Table of Contents
  4. Introduction
  5. Chapter 1: Getting Started
    1. Installation on Windows
    2. Installation on Mac OS X
    3. Testing an Installation
    4. Ruby Documentation
    5. Interactive Ruby
    6. Customizing irb
  6. Chapter 2: Simple Scripts
    1. Creating a Basic Script
    2. Execution on Windows
    3. Command-Line Execution
    4. Making Scripts Executable
    5. Creating Output
    6. Taking Input
    7. Making Comments
  7. Chapter 3: Simple Types
    1. Creating Numbers
    2. Performing Arithmetic
    3. Numeric Methods
    4. Creating Strings
    5. Interpolation and Escaping
    6. Common String Methods
    7. Creating Multiline Strings
    8. Using Constants
    9. Dates and Times
  8. Chapter 4: Arrays, Ranges, and Hashes
    1. Creating Arrays
    2. Common Array Methods
    3. Adding Elements
    4. Removing Elements
    5. Arrays and Strings
    6. Using Ranges
    7. Creating a Hash
    8. Common Hash Methods
  9. Chapter 5: Control Structures
    1. Operators
    2. Basic Conditionals
    3. Extended Conditionals
    4. The Conditional Operator
    5. Case Statements
    6. Basic Loops
    7. Numeric Iterators
    8. Collection Iterators
  10. Chapter 6: Creating Methods
    1. Simple Methods
    2. Returning Values
    3. Taking Arguments
    4. Default Argument Values
    5. Using self
    6. Variable-Length Arguments
    7. Methods and Blocks
  11. Chapter 7: Creating Classes
    1. Simple Classes
    2. Instance Variables
    3. Using Accessors
    4. Creating Constructors
    5. Defining Operators
    6. Other Special Methods
    7. Validation and Duck Typing
  12. Chapter 8: Inheritance and More
    1. Basic Inheritance
    2. Overriding Methods
    3. Chaining Methods
    4. Access Control
    5. Class Variables
    6. Class Methods
  13. Chapter 9: Modules and Includes
    1. Modules as Namespaces
    2. Modules as Mixins
    3. Requiring Files
    4. Ruby Standard Library
  14. Chapter 10: Regular Expressions
    1. Performing Matches
    2. Defining Simple Patterns
    3. Using Anchors
    4. Using Quantifiers
    5. Using Character Classes
    6. Using Modifiers
    7. Finding Matches
    8. Performing Substitutions
  15. Chapter 11: Debugging and Error Handling
    1. Using the Ruby Debugger
    2. Exception Handling
    3. Handling Exceptions by Type
    4. Raising Exceptions
    5. Unit Testing
  16. Chapter 12: RubyGems
    1. Installing RubyGems
    2. Managing and Installing Gems
    3. Using Gems
    4. The creditcard Gem
    5. The Highline Gem
    6. The RedCloth Gem
  17. Chapter 13: Directories and Files
    1. The Basics
    2. Accessing Directory Contents
    3. Directory and File Properties
    4. Permissions
    5. Creating, Moving, Copying, and Deleting
    6. Reading from Files
    7. Writing to Files
    8. Using FasterCSV
  18. Chapter 14: Databases
    1. Getting Started
    2. Executing Simple Queries
    3. Inserting Records
    4. Retrieving Records
    5. Performing Transactions
  19. Chapter 15: Networking
    1. Creating a Socket Server
    2. Using Threads
    3. Creating a Socket Client
    4. HTTP Connections
    5. Handling RSS Feeds
  20. Chapter 16: Ruby on Rails
    1. A Rails Primer
    2. Getting Started
    3. Database Configuration
    4. Creating the Database
    5. Trying the Site
    6. Customizing Models
    7. Customizing Views
    8. Customizing Controllers
  21. Chapter 17: Dynamic Programming
    1. OS Integration
    2. Tainted Data
    3. Safe Levels
    4. Procs and Lambdas
  22. Index

Product information

  • Title: Ruby: Visual Quickstart Guide
  • Author(s):
  • Release date: November 2008
  • Publisher(s): Peachpit Press
  • ISBN: 9780321580658