Comprehensive Ruby Programming

This book will provide you with all of the tools you need to be a professional Ruby developer. Starting with the core principles, such as syntax and best practices, and up to advanced topics like metaprogramming and big data analysis.
Preview in Mapt

Comprehensive Ruby Programming

Jordan Hudgens

6 customer reviews
This book will provide you with all of the tools you need to be a professional Ruby developer. Starting with the core principles, such as syntax and best practices, and up to advanced topics like metaprogramming and big data analysis.

Quick links: > What will you learn?> Table of content> Product reviews

eBook
$5.00
RRP $31.99
Save 84%
Print + eBook
$39.99
RRP $39.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$5.00
$39.99
RRP $31.99
RRP $39.99
eBook
Print + eBook

Frequently bought together


Comprehensive Ruby Programming Book Cover
Comprehensive Ruby Programming
$ 31.99
$ 5.00
DevOps Bootcamp Book Cover
DevOps Bootcamp
$ 31.99
$ 5.00
Buy 2 for $10.00
Save $53.98
Add to Cart

Book Details

ISBN 139781787280649
Paperback330 pages

Book Description

Ruby is a powerful, general-purpose programming language that can be applied to any task. Whether you are an experienced developer who wants to learn a new language or you are new to programming, this book is your comprehensive Ruby coding guide. Starting with the foundational principles, such as syntax, and scaling up to advanced topics such as big data analysis, this book will give you all of the tools you need to be a professional Ruby developer. A few of the key topics are: object-oriented programming, built-in Ruby methods, core programming skills, and an introduction to the Ruby on Rails and Sinatra web frameworks. You will also build 10 practical Ruby programs.

Created by an experienced Ruby developer, this book has been written to ensure it focuses on the skills you will need to be a professional Ruby developer. After you have read this book, you will be ready to start building real-world Ruby projects.

Table of Contents

Chapter 1: Introduction to the Ruby Programming Language
What is Ruby?
Popular sites that use Ruby
Installing Ruby on a computer
Installing different Ruby versions with RVM
Summary
Chapter 2: Ruby Variables
Using variables in Ruby
Printing to the Ruby console
Getting input from the Ruby console using gets and chomp
Variable scope and variable types
Summary
Chapter 3: Ruby Strings
Using strings in Ruby
String interpolation guide for Ruby
String manipulation guide
A practical implementation
String substitution guide
Split, strip, and join guides for strings
Summary
Chapter 4: Working with Numbers in Ruby
Integer arithmetic guide
Arithmetic order of operations
Difference between integers and floats
Summary
Chapter 5: Ruby Methods
Creating methods in Ruby
What does a Ruby method return?
What are the differences between class and instance methods in Ruby?
Ruby proc tutorial
The Ruby lambda tutorial
What is the difference between procs and lambdas in Ruby?
Guide to method arguments in Ruby
Using splat and optional arguments in Ruby methods
Summary
Chapter 6: Ruby Iterators and Loops
The while loop guide
The each iterator method tutorial
The for...in loops tutorial
Looping over a hash
Using the select method
Using the map method – part 1
Using the map method – part 2
Summing values in an array using the inject method
Summary
Chapter 7: Ruby Collections
Using arrays
Deleting items from arrays
Using push and pop for arrays
The Ruby hash tutorial
Deleting elements from a hash
Iterating over a hash for a key or value
Top hash methods in Ruby
Summary
Chapter 8: Ruby Conditionals
The conditionals guide
Syntax for the unless conditional
Nested if...else conditionals
Guide to compound conditionals
Summary
Chapter 9: Object-Oriented Programming in Ruby
Introduction to how OOP works
Ruby OOP development – setters, getters, and methods
Working with instantiation in Ruby
Creating an initializer method in a Ruby class
The working of OOP inheritance
Overview of private versus public methods
The working of polymorphism and usage of super
Dead simple OOP
SOLID OOP development – the simple responsibility principle
SOLID OOP development – the open/closed principle guide and example
SOLID OOP development – the Liskov substitution principle
SOLID OOP development – the interface segregation principle
SOLID OOP development – the dependency inversion principle
Summary
Chapter 10: Working with the Filesystem in Ruby
Creating a file
Reading files into a program using the File class
Deleting a file
Appending a file
Summary
Chapter 11: Error Handling in Ruby
Error handling tutorial
Error handling – the best practices
Developing a custom error logger in Ruby
Summary
Chapter 12: Regular Expressions in Ruby
Regular expression code example
How to validate an IP address using regular expressions
How to develop a wheel of fortune game
Summary
Chapter 13: Searching with grep in Ruby
How to use grep in Ruby
How to use grep instead of the select and map methods
Summary
Chapter 14: Ruby Gems
Introduction to Ruby gems
How to research Ruby gems
Summary
Chapter 15: Ruby Metaprogramming
Metaprogramming introduction
How to integrate metaprogramming techniques into a custom class
How to use metaprogramming for opening and customizing the String class
How Rails use metaprogramming for the find_by method
Utilizing metaprogramming with method_missing to create methods on the fly
Incorporating respond_to_missing to conform to metaprogramming best practices
Implementing metaprogramming with define_method
Summary
Chapter 16: Ruby Web Frameworks
Sinatra web framework development
Introduction to the Ruby on Rails framework
Summary
Chapter 17: Working with APIs in Ruby
How to work with APIs in Ruby
How to use the httparty Ruby gem
How to create a custom API connector in Ruby
How to parse an API in Ruby
Summary
Chapter 18: Ruby Algorithms
Introduction to sorting algorithms
Implementing the bubble sort algorithm
Implementing the quick sort algorithm
Implementing the merge sort algorithm
Implementing a prime number counting algorithm
How to code the power digit sum algorithm
Implementing a humanize counting algorithm
Implementing a date algorithm
How to code a Fibonacci digit counter
Implementing a permutation algorithm
Implementing an amicable number algorithm
Implementing a factorial algorithm
Implementing an even Fibonacci number algorithm
Implementing the least common multiple
Summary
Chapter 19: Machine Learning
Big data analysis
Basic decision tree implementation
How to develop a big data analysis application in Ruby
Summary

What You Will Learn

  • Learn how to use Ruby code effectively, picking the right tool for the job and not duplicating built-in functionality
  • Gain best software development practices, and how to identify and fix common errors
  • Absorb core programming skills, such as variables, strings, loops, conditionals, and much more
  • Explore object-oriented programming and learn to create modular, reusable code that you can use across projects
  • Build 10 practical Ruby programs as you work through the book on topics such as big data analysis and solving Euler equations

Authors

Table of Contents

Chapter 1: Introduction to the Ruby Programming Language
What is Ruby?
Popular sites that use Ruby
Installing Ruby on a computer
Installing different Ruby versions with RVM
Summary
Chapter 2: Ruby Variables
Using variables in Ruby
Printing to the Ruby console
Getting input from the Ruby console using gets and chomp
Variable scope and variable types
Summary
Chapter 3: Ruby Strings
Using strings in Ruby
String interpolation guide for Ruby
String manipulation guide
A practical implementation
String substitution guide
Split, strip, and join guides for strings
Summary
Chapter 4: Working with Numbers in Ruby
Integer arithmetic guide
Arithmetic order of operations
Difference between integers and floats
Summary
Chapter 5: Ruby Methods
Creating methods in Ruby
What does a Ruby method return?
What are the differences between class and instance methods in Ruby?
Ruby proc tutorial
The Ruby lambda tutorial
What is the difference between procs and lambdas in Ruby?
Guide to method arguments in Ruby
Using splat and optional arguments in Ruby methods
Summary
Chapter 6: Ruby Iterators and Loops
The while loop guide
The each iterator method tutorial
The for...in loops tutorial
Looping over a hash
Using the select method
Using the map method – part 1
Using the map method – part 2
Summing values in an array using the inject method
Summary
Chapter 7: Ruby Collections
Using arrays
Deleting items from arrays
Using push and pop for arrays
The Ruby hash tutorial
Deleting elements from a hash
Iterating over a hash for a key or value
Top hash methods in Ruby
Summary
Chapter 8: Ruby Conditionals
The conditionals guide
Syntax for the unless conditional
Nested if...else conditionals
Guide to compound conditionals
Summary
Chapter 9: Object-Oriented Programming in Ruby
Introduction to how OOP works
Ruby OOP development – setters, getters, and methods
Working with instantiation in Ruby
Creating an initializer method in a Ruby class
The working of OOP inheritance
Overview of private versus public methods
The working of polymorphism and usage of super
Dead simple OOP
SOLID OOP development – the simple responsibility principle
SOLID OOP development – the open/closed principle guide and example
SOLID OOP development – the Liskov substitution principle
SOLID OOP development – the interface segregation principle
SOLID OOP development – the dependency inversion principle
Summary
Chapter 10: Working with the Filesystem in Ruby
Creating a file
Reading files into a program using the File class
Deleting a file
Appending a file
Summary
Chapter 11: Error Handling in Ruby
Error handling tutorial
Error handling – the best practices
Developing a custom error logger in Ruby
Summary
Chapter 12: Regular Expressions in Ruby
Regular expression code example
How to validate an IP address using regular expressions
How to develop a wheel of fortune game
Summary
Chapter 13: Searching with grep in Ruby
How to use grep in Ruby
How to use grep instead of the select and map methods
Summary
Chapter 14: Ruby Gems
Introduction to Ruby gems
How to research Ruby gems
Summary
Chapter 15: Ruby Metaprogramming
Metaprogramming introduction
How to integrate metaprogramming techniques into a custom class
How to use metaprogramming for opening and customizing the String class
How Rails use metaprogramming for the find_by method
Utilizing metaprogramming with method_missing to create methods on the fly
Incorporating respond_to_missing to conform to metaprogramming best practices
Implementing metaprogramming with define_method
Summary
Chapter 16: Ruby Web Frameworks
Sinatra web framework development
Introduction to the Ruby on Rails framework
Summary
Chapter 17: Working with APIs in Ruby
How to work with APIs in Ruby
How to use the httparty Ruby gem
How to create a custom API connector in Ruby
How to parse an API in Ruby
Summary
Chapter 18: Ruby Algorithms
Introduction to sorting algorithms
Implementing the bubble sort algorithm
Implementing the quick sort algorithm
Implementing the merge sort algorithm
Implementing a prime number counting algorithm
How to code the power digit sum algorithm
Implementing a humanize counting algorithm
Implementing a date algorithm
How to code a Fibonacci digit counter
Implementing a permutation algorithm
Implementing an amicable number algorithm
Implementing a factorial algorithm
Implementing an even Fibonacci number algorithm
Implementing the least common multiple
Summary
Chapter 19: Machine Learning
Big data analysis
Basic decision tree implementation
How to develop a big data analysis application in Ruby
Summary

Book Details

ISBN 139781787280649
Paperback330 pages
Read More
From 6 reviews

Read More Reviews

Recommended for You

DevOps Bootcamp Book Cover
DevOps Bootcamp
$ 31.99
$ 5.00
DevOps: Puppet, Docker, and Kubernetes Book Cover
DevOps: Puppet, Docker, and Kubernetes
$ 79.99
$ 5.00
Bootstrap 4 - Responsive Web Design Book Cover
Bootstrap 4 - Responsive Web Design
$ 71.99
$ 5.00
Comprehensive Ruby Programming [Video] Book Cover
Comprehensive Ruby Programming [Video]
$ 39.99
$ 5.00
Rust Programming By Example Book Cover
Rust Programming By Example
$ 35.99
$ 5.00
Unity 2017 Game AI programming - Third Edition Book Cover
Unity 2017 Game AI programming - Third Edition
$ 39.99
$ 5.00