Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Comprehensive Ruby Programming

You're reading from   Comprehensive Ruby Programming From beginner to confident programmer

Arrow left icon
Product type Paperback
Published in Jun 2017
Publisher Packt
ISBN-13 9781787280649
Length 330 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Jordan Hudgens Jordan Hudgens
Author Profile Icon Jordan Hudgens
Jordan Hudgens
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Introduction to the Ruby Programming Language 2. Ruby Variables FREE CHAPTER 3. Ruby Strings 4. Working with Numbers in Ruby 5. Ruby Methods 6. Ruby Iterators and Loops 7. Ruby Collections 8. Ruby Conditionals 9. Object-Oriented Programming in Ruby 10. Working with the Filesystem in Ruby 11. Error Handling in Ruby 12. Regular Expressions in Ruby 13. Searching with grep in Ruby 14. Ruby Gems 15. Ruby Metaprogramming 16. Ruby Web Frameworks 17. Working with APIs in Ruby 18. Ruby Algorithms 19. Machine Learning

What this book covers

Chapter 1, Introduction to the Ruby Programming Language, gives a high-level view of the Ruby programming language, how to install it on your system, and getting it up and running so you can start building Ruby programs.

Chapter 2, Ruby Variables, teaches you how to work with variables in Ruby to store data and use the data throughout a program, because Ruby variables are the building blocks of just about every Ruby program.

Chapter 3, Ruby Strings, teaches about the Ruby string data type and walks you through how to integrate string data into a Ruby program. Working with words, sentences, and paragraphs are common requirements in many applications.

Chapter 4, Working with Numbers in Ruby, explains how to work with different number data types in a Ruby program, including the integer and float types. A key component in building programs is developing mathematical equations in order to implement various algorithms.

Chapter 5, Ruby Methods, teaches how to create and use methods in Ruby programs to store processes and reuse them throughout a program, including an overview of procs and lambdas. One of the most powerful tools available to developers is the ability to store functionality and share that behavior throughout a program.

Chapter 6, Ruby Iterators and Loops, works you through the powerful iteration tools that come with the Ruby programming language that allow you to traverse various collection types. When it comes to developing programs, one of the common tools utilized by programmers is the ability to loop through collections of data.

Chapter 7, Ruby Collections, shows that nearly every application that you will build will need to implement collections of data in some form or another. This could be anything from a database query that returns multiple records to a set of dates in a calendar.

Chapter 8, Ruby Conditionals, teaches how to integrate conditionals into a Ruby program, which will enable your programs to have dynamic behavior based on different input data. A key component for building dynamic behavior into Ruby applications requires conditional logic at some stage or another.

Chapter 9, Object-Oriented Programming in Ruby, teaches you Object-Oriented Programming (OOP) for Ruby, including creating classes, instantiating objects, working with inheritance, and polymorphism. In addition to readability, one of the defining attributes of the Ruby programming language is how it implements OOP techniques.

Chapter 10, Working with the Filesystem in Ruby, reveals various ways to work with files in Ruby, including the ability to create, open, edit, and delete files using built-in methods and classes.

Chapter 11, Error Handling in Ruby, explains how to work with errors in Ruby, including how to build practical tools such as an error logging program. Many new developers are intimidated when they come across errors and exceptions in a program. However, errors are Ruby's way of telling you how you can improve or alter your program to work properly.

Chapter 12, Regular Expressions in Ruby, enables you to work with regular expressions in Ruby, including the built in Regex class that allows you to build matchers and dynamically search through data. Pattern matching is a common requirement for building code libraries such as validations and basic search functionality.

Chapter 13, Searching with grep in Ruby, teaches how to use the powerful grep method in Ruby programs in order to search through data. Ruby offers a wide variety of options when it comes to searching through strings.

Chapter 14, Ruby Gems, walks you through and teaches what Ruby gems are, how to use them, and where you can find new gems to give your Ruby programs additional functionality. One of the reasons for Ruby's growth in popularity over the past decade is the open source community building code libraries that can be implemented in other applications. Typically, these code libraries are called Ruby gems.

Chapter 15, Ruby Metaprogramming, explains some of the basics of metaprogramming in Ruby, including how to open classes and add functionality to built-in Ruby classes. Writing code that writes code is one of the more challenging topics in any programming language. However, metaprogramming in Ruby offers such a powerful interface for building advanced features into an application. It is worth the effort to learn it.

Chapter 16, Ruby Web Frameworks, reveals the two most popular web frameworks for Ruby programs, Rails and Sinatra, including building applications for both frameworks.

Chapter 17, Working with APIs in Ruby, walks you through how to work with APIs and build a Ruby program that communicates with a third-party API and parses the JSON data. Working with outside services is a powerful mechanism for building data-driven applications.

Chapter 18, Ruby Algorithms, puts together all of the knowledge that we've compiled in the book in order to implement popular algorithms. Specifically, you'll learn how to build advanced algorithms in the Ruby programming language, including the sorting methods, such as quick sort and merge sort, along with a number of functional programming algorithms.

Chapter 19, Machine Learning, teaches how to integrate machine learning algorithms into a Ruby program, including how to build a decision tree, train it, and have it output dynamic results. One of the fastest growing sectors in development is machine learning.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime