Muutke küpsiste eelistusi

E-raamat: Well-Grounded Rubyist

  • Formaat: 584 pages
  • Ilmumisaeg: 05-Mar-2019
  • Kirjastus: Manning Publications
  • Keel: eng
  • ISBN-13: 9781638356233
Teised raamatud teemal:
  • Formaat - EPUB+DRM
  • Hind: 45,77 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Lisa ostukorvi
  • Lisa soovinimekirja
  • See e-raamat on mõeldud ainult isiklikuks kasutamiseks. E-raamatuid ei saa tagastada.
  • Formaat: 584 pages
  • Ilmumisaeg: 05-Mar-2019
  • Kirjastus: Manning Publications
  • Keel: eng
  • ISBN-13: 9781638356233
Teised raamatud teemal:

DRM piirangud

  • Kopeerimine (copy/paste):

    ei ole lubatud

  • Printimine:

    ei ole lubatud

  • Kasutamine:

    Digitaalõiguste kaitse (DRM)
    Kirjastus on väljastanud selle e-raamatu krüpteeritud kujul, mis tähendab, et selle lugemiseks peate installeerima spetsiaalse tarkvara. Samuti peate looma endale  Adobe ID Rohkem infot siin. E-raamatut saab lugeda 1 kasutaja ning alla laadida kuni 6'de seadmesse (kõik autoriseeritud sama Adobe ID-ga).

    Vajalik tarkvara
    Mobiilsetes seadmetes (telefon või tahvelarvuti) lugemiseks peate installeerima selle tasuta rakenduse: PocketBook Reader (iOS / Android)

    PC või Mac seadmes lugemiseks peate installima Adobe Digital Editionsi (Seeon tasuta rakendus spetsiaalselt e-raamatute lugemiseks. Seda ei tohi segamini ajada Adober Reader'iga, mis tõenäoliselt on juba teie arvutisse installeeritud )

    Seda e-raamatut ei saa lugeda Amazon Kindle's. 

Description

Ruby is a dynamic language perfect for creating applications, development tools, and administrative scripts.

 

The Well-Grounded Rubyist, Third Edition is a perfect tutorial for newcomers to Ruby and a great way for experienced Rubyists to deepen their understanding of the language.

 

Key features

·    Fully updated to cover the latest in Ruby 2.5

·    Clear explanations of Ruby concepts and how to apply them

·    Simple examples to seal in the learning

·    Prepares readers to use Ruby anywhere for any purpose

 

Audience

This book teaches Ruby from the ground up. The reader should have command of basic programming concepts in another language.



About the technology

Because it's the backbone of the well-loved Ruby on Rails web framework, Ruby has become one of the most popular programming languages in the world.

 

David A. Black is an internationally-known Ruby developer, author, trainer, speaker, and event organizer, as well as a co-founder of Ruby Central.

Joseph Leo III is a Ruby teacher, mentor, and community advocate. He is the lead organizer of the Gotham Ruby Conference (GoRuCo) and founder of Def Method.
Preface xix
Acknowledgments xx
About This Book xxii
About The Authors xxvii
About The Cover Illustration xxviii
Part 1: Ruby Foundations 1(200)
1 Bootstrapping your Ruby literacy
3(32)
1.1 Basic Ruby language literacy
4(13)
Installing Ruby and using a text editor
4(2)
A Ruby syntax survival kit
6(1)
The variety of Ruby identifiers
7(2)
Method calls, messages, and Ruby objects
9(2)
Writing and saving a simple program
11(1)
Feeding the program to Ruby
12(2)
Keyboard and file I/O
14(3)
1.2 Anatomy of the Ruby installation
17(3)
The Ruby standard library subdirectory (RbConfig::CONFIG [ "rubylibdir"])
18(1)
The C extensions directory (RbConfig::CONFIG [ "archdir"] )
18(1)
The site_ruby (RbConfig::CONFIG[ "sitedir"]) and vendor_ruby (RbConfig::CONFIG[ "vendordir"]) directories
19(1)
Standard Ruby gems and the gems directory
19(1)
1.3 Ruby extensions and programming libraries
20(5)
Loading external files and extensions
21(1)
"Load"-ing a file in the default load path
22(1)
"Require"-ing a feature
23(1)
require_relative
24(1)
1.4 Out-of-the-box Ruby tools and applications
25(10)
Interpreter command-line switches
25(4)
A closer look at interactive Ruby interpretation with irb
29(2)
The rake task-management utility
31(2)
Installing packages with the gem command
33(2)
2 Objects, methods, and local variables
35(29)
2.1 Talking to objects
36(5)
Ruby and object orientation
36(1)
Creating a generic object
37(2)
Methods that take arguments
39(1)
The return value of a method
40(1)
2.2 Crafting an object: the behavior of a ticket
41(5)
The ticket object, behavior first
41(1)
Querying the ticket object
42(1)
Shortening the ticket code via string interpolation
43(1)
Ticket availability: expressing Boolean state in a method
44(2)
2.3 The innate behaviors of an object
46(4)
Identifying objects uniquely with the object id method
47(1)
Querying an object's abilities with the respond to? method
48(1)
Sending messages to objects with the send method
48(2)
2.4 A close look at method arguments
50(6)
Required and optional arguments
50(1)
Default values for arguments
51(1)
Order of parameters and arguments
52(2)
What you can't do in argument lists
54(2)
2.5 Local variables and variable assignment
56(8)
Variables, objects, and references
57(2)
References in variable assignment and reassignment
59(1)
References and method arguments
60(2)
Local variables and the things that look like them
62(2)
3 Organizing objects with classes
64(31)
3.1 Classes and instances
65(4)
Instance methods
66(1)
Overriding methods
67(1)
Reopening classes
67(2)
3.2 Instance variables and object state
69(3)
Initializing an object with state
71(1)
3.3 Setter methods
72(5)
The equal sign (=) in method names
73(1)
Syntactic sugar for assignment-like methods
74(1)
Setter methods unleashed
75(2)
3.4 Attributes and the attr_* method family
77(3)
Automating the creation of attributes
78(2)
Summary of attr_* methods
80(1)
3.5 Inheritance and the Ruby class hierarchy
80(3)
Single inheritance: one to a customer
81(1)
Object ancestry and the not-so-missing link: the Object class
82(1)
BasicObject
83(1)
3.6 Classes as objects and message receivers
83(6)
Creating class objects
83(2)
How class objects call methods
85(1)
A singleton method by any other name...
86(1)
When, and why, to write a class method
87(1)
Class methods vs. instance methods
88(1)
3.7 Constants up close
89(3)
Basic use of constants
90(1)
Reassigning vs. modifying constants
91(1)
3.8 Nature vs. nurture in Ruby objects
92(3)
4 Modules and program organization
95(30)
4.1 Basics of module creation and use
96(7)
A module encapsulating "stacklikeness"
97(2)
Mixing a module into a class
99(2)
Using the module further
101(2)
4.2 Modules, classes, and method lookup
103(12)
Illustrating the basics of method lookup
103(3)
Defining the same method more than once
106(3)
How prepend works
109(1)
How extend works
110(1)
The rules of method lookup summarized
111(1)
Going up the method search path with super
112(2)
Inspecting method hierarchies with method and super method
114(1)
4.3 The method_missing method
115(6)
Combining method_missing and super
116(5)
4.4 Class/Module design and naming
121(4)
Mix-ins and/or inheritance
121(2)
Nesting modules and classes
123(2)
5 The default object (self), scope, and visibility
125(34)
5.1 Understanding self, the current/default object
126(10)
Who gets to be self, and where
126(2)
The top-level self object
128(1)
Self inside class, module, and method definitions
129(3)
Self as the default receiver of messages
132(2)
Resolving instance variables through self
134(2)
5.2 Determining scope
136(15)
Global scope and global variables
136(3)
Local scope
139(2)
The interaction between local scope and self
141(2)
Scope and resolution of constants
143(2)
Class variable syntax, scope, and visibility
145(6)
5.3 Deploying method-access rules
151(5)
Private methods
151(4)
Protected methods
155(1)
5.4 Writing and using top-level methods
156(3)
Defining a top-level method
156(1)
Predefined (built-in) top-level methods
157(2)
6 Control-flow techniques
159(42)
6.1 Conditional code execution
160(12)
The if keyword and its variants
160(5)
Assignment syntax in condition bodies and tests
165(2)
case statements
167(5)
6.2 Repeating actions with loops
172(5)
Unconditional looping with the loop method
173(1)
Conditional looping with the while and until keywords
174(2)
Multiple assignment in conditional statements
176(1)
Looping based on a list of values
176(1)
6.3 Iterators and code blocks
177(12)
The ingredients of iteration
177(1)
Iteration, home-style
178(1)
The anatomy of a method call
179(1)
Curly braces vs. do/end in code block syntax
179(2)
Implementing times
181(1)
The importance of being each
182(2)
From each to map
184(1)
Block parameters and variable scope
185(4)
6.4 Error handling and exceptions
189(14)
Raising and rescuing exceptions
189(1)
The rescue keyword to the rescue!
190(2)
Debugging with binding. irb
192(2)
Avoiding NoMethodError with the safe navigation operator
194(1)
Raising exceptions explicitly
195(1)
Capturing an exception in a rescue clause
196(2)
The ensure clause
198(1)
Creating your own exception classes
198(3)
Part 2: Built-In Classes And Modules 201(212)
7 Built-in essentials
203(30)
7.1 Ruby's literal constructors
205(1)
7.2 Recurrent syntactic sugar
206(4)
Defining operators by defining methods
207(2)
Customizing unary operators
209(1)
7.3 Bang (!) methods and "danger"
210(3)
Destructive (receiver-changing) effects as danger
210(2)
Destructiveness and "danger" vary independently
212(1)
7.4 Built-in and custom to_* (conversion) methods
213(7)
String conversion: to_s and other methods defined on Object
213(3)
Array conversion with to_a and the * operator
216(1)
Numerical conversion with to_i and to_f
217(2)
Role-playing to_ * methods
219(1)
7.5 Boolean states, Boolean objects, and nil
220(5)
True and false as states
221(2)
true and false as objects
223(1)
The special object nil
224(1)
7.6 Comparing two objects
225(4)
Equality tests
226(1)
Comparisons and the Comparable module
227(2)
7.7 Inspecting object capabilities
229(4)
Listing an object's methods
229(2)
Querying class and module objects
231(1)
Filtered and selected method lists
231(2)
8 Strings, symbols, and other scalar objects
233(35)
8.1 Working with strings
234(18)
String notation
234(5)
Basic string manipulation
239(4)
Querying strings
243(2)
String comparison and ordering
245(1)
String transformation
246(3)
String conversions
249(1)
String encoding: a brief introduction
250(2)
8.2 Symbols and their uses
252(6)
Chief characteristics of symbols
253(1)
Symbols and identifiers
254(1)
Symbols in practice
255(2)
Strings and symbols in comparison
257(1)
8.3 Numerical objects
258(2)
Numerical classes
259(1)
Performing arithmetic operations
259(1)
8.4 Times and dates
260(8)
Instantiating Date/Time Objects
261(2)
Date/Time query methods
263(1)
Date/Time Formatting Methods
264(1)
Date/time Conversion Methods
265(3)
9 Collection and container objects
268(35)
9.1 Arrays and hashes in comparison
269(1)
9.2 Collection handling with arrays
270(12)
Creating a new array
271(4)
Inserting, retrieving, and removing array elements
275(4)
Combining arrays with other arrays
279(1)
Array transformations
280(1)
Array querying
281(1)
9.3 Hashes
282(12)
Creating a new hash
283(1)
Inserting, retrieving, and removing hash pairs
284(2)
Specifying default hash values and behavior
286(1)
Combining hashes with other hashes
287(1)
Hash transformations
288(2)
Hash querying
290(1)
Hashes as final method arguments
291(1)
A detour back to argument syntax: named (keyword) arguments
292(2)
9.4 Ranges
294(3)
Creating a range
294(1)
Range-inclusion logic
295(2)
9.5 Sets
297(6)
Set creation
298(1)
Manipulating set elements
298(3)
Subsets and supersets
301(2)
10 Collections central: Enumerable and Enumerator
303(48)
10.1 Gaining enumerability through each
305(2)
10.2 Enumerable Boolean queries
307(2)
10.3 Enumerable searching and selecting
309(5)
Getting the first match with find
309(2)
Getting all matches with find_all (a.k.a. select) and reject
311(1)
Selecting on threequal matches with grep
311(1)
Organizing selection results with group_by and partition
312(2)
10.4 Element-wise enumerable operations
314(4)
The first method
314(2)
The take and drop methods
316(1)
The min and max methods
316(2)
10.5 Relatives of each
318(6)
reverse_each
318(1)
The each_with_index method (and each.with_index)
318(1)
The each_slice and each_cons methods
319(1)
The slice_family of methods
320(1)
The cycle method
321(1)
Enumerable reduction with inject
322(2)
10.6 The map method
324(2)
The return value of map
324(1)
In-place mapping with map!
325(1)
10.7 Strings as quasi-enumerables
326(2)
10.8 Sorting enumerables
328(4)
Defining sort-order logic with a block
330(1)
Concise sorting with sort_by
330(1)
Sorting enumerables and the Comparable module
331(1)
10.9 Enumerators and the next dimension of enumerability
332(5)
Creating enumerators with a code block
333(2)
Attaching enumerators to other objects
335(1)
Implicit creation of enumerators by blockless iterator calls
336(1)
10.10 Enumerator semantics and uses
337(6)
How to use an enumerator's each method
337(2)
Protecting objects with enumerators
339(2)
Fine-grained iteration with enumerators
341(1)
Adding enumerability with an enumerator
341(2)
10.11 Enumerator method chaining
343(4)
Economizing on intermediate objects
343(2)
Indexing enumerables with with_index
345(1)
Exclusive-or operations on strings with enumerators
345(2)
10.12 Lazy enumerators
347(4)
FizzBuzz with a lazy enumerator
348(3)
11 Regular expressions and regexp-based string operations
351(34)
11.1 What are regular expressions?
352(1)
11.2 Writing regular expressions
352(3)
Seeing patterns
353(1)
Simple matching with literal regular expressions
353(2)
11.3 Building a pattern in a regular expression
355(3)
Literal characters in patterns
356(1)
The dot wildcard character (.)
356(1)
Character classes
357(1)
11.4 Matching, substring Captures, and MatchData
358(7)
Capturing submatches with parentheses
358(2)
Match success and failure
360(1)
Two ways of getting the captures
361(3)
Other MatchData information
364(1)
11.5 Fine-tuning regular expressions with quantifiers, anchors, and modifiers
365(9)
Constraining matches with quantifiers
365(2)
Greedy (and non-greedy) quantifiers
367(2)
Regular expression anchors and assertions
369(4)
Modifiers
373(1)
11.6 Converting strings and regular expressions to each other
374(3)
String-to-regexp idioms
375(2)
Going from a regular expression to a string
377(1)
11.7 Common methods that use regular expressions
377(8)
String#scan
377(2)
String#split
379(1)
sub/sub! and gsub/gsub!
380(2)
Case equality and grep
382(3)
12 File and I/O operations
385(28)
12.1 How Ruby's I/O system is put together
386(4)
The IO class
386(1)
IO objects as enumerables
387(1)
STDIN, STDOUT, STDERR
388(1)
A little more about keyboard input
389(1)
12.2 Basic file operations
390(9)
The basics of reading from files
390(1)
Line-based file reading
391(1)
Byte-and character-based file reading
392(1)
Seeking and querying file position
392(1)
Reading files with File class methods
393(1)
Writing to files
394(1)
Using blocks to scope file operations
395(1)
File enumerability
396(1)
File I/O exceptions and errors
397(2)
12.3 Querying IO and File objects
399(2)
Getting information from the File class and the FileTest module
399(2)
Deriving file information with File::Stat
401(1)
12.4 Directory manipulation with the Dir class
401(4)
Reading a directory's entries
402(2)
Directory manipulation and querying
404(1)
12.5 File tools from the standard library
405(10)
The FileUtils module
406(2)
The Pathname class
408(1)
The StringIO class
409(2)
The open-uri library
411(2)
Part 3: Ruby Dynamics 413(126)
13 Object individuation
415(30)
13.1 Where the singleton methods are: the singleton class
416(11)
Dual determination through singleton classes
417(1)
Examining and modifying a singleton class directly
418(2)
Singleton classes on the method-lookup path
420(5)
The singleton_class method
425(1)
Class methods in (even more) depth
425(2)
13.2 Modifying Ruby's core classes and modules
427(12)
The risks of changing core functionality
427(5)
Additive changes
432(1)
Pass-through overrides
433(2)
Per-object changes with extend
435(3)
Using refinements to affect core behavior
438(1)
13.3 BasicObject as ancestor and class
439(6)
Using BasicObject
439(2)
Implementing a subclass of BasicObject
441(4)
14 Callable and runnable objects
445(40)
14.1 Basic anonymous functions: the Proc class
446(10)
Proc objects
446(1)
Procs and blocks and how they differ
447(1)
Block-proc conversions
448(4)
Using Symbol#to_proc for conciseness
452(1)
Procs as closures
453(3)
Proc parameters and arguments
456(1)
14.2 Creating functions with lambda and->
456(2)
14.3 Methods as objects
458(3)
Capturing Method objects
458(1)
The rationale for methods as objects
459(2)
14.4 The eval family of methods
461(6)
Executing arbitrary strings as code with eval
461(1)
The dangers of eval
462(1)
The instance eval method
463(2)
Using class_eval (a.k.a. module_eval)
465(2)
14.5 Concurrent execution with threads
467(11)
Killing, stopping, and starting threads
469(2)
A threaded date server
471(1)
Writing a chat server using sockets and threads
472(2)
Threads and variables
474(1)
Manipulating thread keys
475(3)
14.6 Issuing system commands from inside Ruby programs
478(7)
The system and exec methods and backticks
479(2)
Communicating with programs via open and popen3
481(4)
15 Callbacks, hooks, and runtime introspection
485(30)
15.1 Callbacks and hooks
486(10)
Intercepting unrecognized messages with method_missing
486(3)
Trapping include and prepend operations
489(1)
Intercepting extend
490(2)
Intercepting inheritance with Class#inherited
492(1)
The Module#const_missing method
493(1)
The method_added and singleton_method_added methods
494(2)
15.2 Interpreting object capability queries
496(7)
Listing an object's non-private methods
496(2)
Listing private and protected methods
498(1)
Getting class and module instance methods
499(2)
Listing objects' singleton methods
501(2)
15.3 Introspection of variables and constants
503(2)
Listing local and global variables
503(1)
Listing instance variables
504(1)
15.4 Tracing execution
505(4)
Examining the stack trace with caller
505(1)
Writing a tool for parsing stack traces
506(3)
15.5 Callbacks and method inspection in practice
509(6)
Micro Test background: Mini Test
509(2)
Specifying and implementing Micro Test
511(4)
16 Ruby and functional programming
515(24)
16.1 Understanding pure functions
516(7)
Methods with side effects
517(1)
Pure functions and referential transparency in Ruby
518(1)
Side effects in Ruby's built-in methods
519(2)
Modifying an object's state
521(2)
16.2 Immutability
523(3)
Object#freeze and Object#frozen?
524(1)
Frozen string literals
525(1)
16.3 Higher-order functions
526(7)
Method chaining
527(1)
Kernel#itself and Kernel#yield self
527(2)
Functions that return functions
529(1)
Currying and partial function application
529(4)
16.4 Recursion
533(6)
Lazy evaluation
534(2)
Tail-call optimization
536(3)
Index 539
David A. Black is an internationally-known Ruby developer, author, trainer, speaker, and event organizer, as well as a co-founder of Ruby Central.

Joseph Leo III is a Ruby teacher, mentor, and community advocate. He is the lead organizer of the Gotham Ruby Conference (GoRuCo) and founder of Def Method.