WELL GROUNDED RUBYIST 2ND EDITION PDF

adminComment(0)
    Contents:

Contribute to Definence/The_Well_Grounded_Rubyist development by creating an account on GitHub. Contribute to mattswann/wdi_resources development by creating an account on GitHub. $ pdf + ePub. The Well-Grounded Rubyist, 2nd Edition PDF Free Download , Reviews, Read Online, ISBN: , By David A.


Well Grounded Rubyist 2nd Edition Pdf

Author:WILLARD PEYSER
Language:English, French, German
Country:Lesotho
Genre:Academic & Education
Pages:766
Published (Last):07.11.2015
ISBN:286-7-68158-303-3
ePub File Size:18.46 MB
PDF File Size:19.40 MB
Distribution:Free* [*Registration needed]
Downloads:34959
Uploaded by: ELIZEBETH

In this chapter, we'll explore Ruby's facilities for pattern matching and text process - ing, centering around the use of regular expressions. A regular expression in. June ; ISBN ; pages The Well-Grounded Rubyist, Second Edition addresses both newcomers to Ruby as well as Ruby programmers. Well Grounded Rubyist 2nd Edition by David A Black available in Trade download of the print book includes a free eBook in PDF, site, and.

Parallel execution with threads Killing, stopping, and starting threads A threaded date server Writing a chat server using sockets and threads Threads and variables Issuing system commands from inside Ruby programs The system method and backticks Communicating with programs via open and popen3 Callbacks, hooks, and runtime introspection Callbacks and hooks Trapping include and prepend operations Intercepting extend Intercepting inheritance with Class inherited Interpreting object capability queries Listing private and protected methods Getting class and module instance methods Listing objects' singleton methods Introspection of variables and constants Listing local and global variables Listing instance variables Examining the stack trace with caller Writing a tool for parsing stack traces Callbacks and method inspection in practice MicroTest background: MiniTest Specifying and implementing MicroTest Summary index About the Technology This is a good time for Ruby!

And it's elegant, so creating applications, development tools, and administrative scripts is easier and more straightforward.

With the long-awaited Ruby 2, an active development community, and countless libraries and productivity tools, Ruby has come into its own. A brief introduction. Symbols and their uses 8. Chief characteristics of symbols. Strings and symbols in comparison. Numerical objects 8.

Numerical classes. Performing arithmetic operations. Times and dates 8. Collection and container objects 9.

Arrays and hashes in comparison. Collection handling with arrays 9. Creating a new array. Inserting, retrieving, and removing array elements. Combining arrays with other arrays. Hashes 9.

Creating a new hash. Inserting, retrieving, and removing hash pairs. Specifying default hash values and behavior. Combining hashes with other hashes. Hashes as final method arguments. A detour back to argument syntax: Named keyword arguments. Ranges 9. Creating a range. Sets 9. Set creation. Collections central: Enumerable and Enumerator Gaining enumerability through each. Enumerable searching and selecting Getting the first match with find.

Selecting on threequal matches with grep. Element-wise enumerable operations The first method. Relatives of each Enumerable reduction with inject. The map method The return value of map.

Sorting enumerables Defining sort-order logic with a block. Enumerators and the next dimension of enumerability Creating enumerators with a code block.

Attaching enumerators to other objects. Implicit creation of enumerators by blockless iterator calls. Enumerator semantics and uses Protecting objects with enumerators.

Fine-grained iteration with enumerators. Adding enumerability with an enumerator. Enumerator method chaining Economizing on intermediate objects. Exclusive-or operations on strings with enumerators. Lazy enumerators FizzBuzz with a lazy enumerator.

Regular expressions and regexp-based string operations What are regular expressions? Writing regular expressions Seeing patterns.

Simple matching with literal regular expressions. Building a pattern in a regular expression Literal characters in patterns. The dot wildcard character. Matching, substring captures, and MatchData Capturing submatches with parentheses. Two ways of getting the captures. Fine-tuning regular expressions with quantifiers, anchors, and modifiers Constraining matches with quantifiers.

Greedy and non-greedy quantifiers. Regular expression anchors and assertions. Converting strings and regular expressions to each other String-to-regexp idioms.

Going from a regular expression to a string. Common methods that use regular expressions String scan. The IO class. A little more about keyboard input.

See a Problem?

Basic file operations The basics of reading from files. Byte- and character-based file reading. Seeking and querying file position. Reading files with File class methods. Using blocks to scope file operations. Querying IO and File objects Getting information from the File class and the FileTest module. Deriving file information with File:: Directory manipulation with the Dir class Directory manipulation and querying.

File tools from the standard library The FileUtils module. Object individuation Where the singleton methods are: The singleton class Dual determination through singleton classes. Examining and modifying a singleton class directly. Singleton classes on the method-lookup path. Class methods in even more depth. The risks of changing core functionality.

Per-object changes with extend. Using refinements to affect core behavior. BasicObject as ancestor and class Using BasicObject. Implementing a subclass of BasicObject. Callable and runnable objects Basic anonymous functions: The Proc class Proc objects.

Procs and blocks and how they differ. Proc parameters and arguments. Methods as objects Capturing Method objects. The rationale for methods as objects.

The eval family of methods Executing arbitrary strings as code with eval. Parallel execution with threads Killing, stopping, and starting threads. Writing a chat server using sockets and threads.

The Well-Grounded Rubyist, 2nd edition

Issuing system commands from inside Ruby programs The system method and backticks. Communicating with programs via open and popen3. Callbacks, hooks, and runtime introspection Callbacks and hooks Trapping include and prepend operations.

Intercepting inheritance with Class inherited. Interpreting object capability queries Listing private and protected methods. Getting class and module instance methods. Listing objects' singleton methods. Introspection of variables and constants Listing local and global variables. Tracing execution Examining the stack trace with caller. Writing a tool for parsing stack traces. Callbacks and method inspection in practice MicroTest background: Specifying and implementing MicroTest.

About the Technology This is a good time for Ruby!

The Well-Grounded Rubyist, Second Edition

About the book The Well-Grounded Rubyist, Second Edition is a beautifully written tutorial that begins with your first Ruby program and goes on to explore sophisticated topics like callable objects, reflection, and threading.

About the author David A. Don't refresh or navigate away from the page. The Joy of Clojure, Second Edition. Byrd and Daniel P. Git in Practice.The book concentrates on the language, preparing you to use Ruby in any way you choose.

Crafting an object: Shortening the ticket code via string interpolation. The FileUtils module. Well done!

If you're an experienced developer, get the comprehensive, insider information you need for the Working with strings 8. Per-object changes with extend Repeating actions with loops 6. Used by sites as varied as Twitter, GitHub, Disney, and Airbnb, Ruby on Rails is one of the most popular frameworks for developing web applications, but it can be challenging to learn and use.