更新时间:2023-07-14 05:06
《Ruby程序设计语言》是2008年05月东南大学出版社出版的图书,作者是(美)费拉纳根。
《Ruby程序设计语言》是Ruby的权威指南,全面涵盖该语言的1.8版和1.9版。本书详尽但并不拘泥于语言规范,既适合首次接触Ruby的资深程序员,同样也适合那些想要挑战对这门语言的理解并更深入掌握它的Ruby程序员。本书首先通过一个快速指南带您熟悉这门语言,然后彻底解释它的细节,包括:
Ruby程序的词法和句法结构
数据类型和对象
表达式和操作符
语句和控制结构
Method、proc、lambda和closure
类和模块
反射和元编程
Ruby平台《Ruby程序设计语言》包含了对Ruby平台的大量API的全面介绍,通过包含详尽注释的代码展示了如何将Ruby用于文本处理、数值处理、集合、输入/输出、网络和并发。如果您真想要理解Ruby,本书不可或缺。
Preface
1.Introduction
1.1ATourofRuby
1.2TryRuby
1.3AboutThisBook
1.4ASudokuSolverinRuby
2.TheStructureandExecutionofRubyPrograms
2.1LexicalStructure
2.2SyntacticStructure
2.3FileStructure
2.4ProgramEncoding
2.5ProgramExecution
3.DatatypesandObjects
3.1Numbers
3.2Text
3.3Arrays
3.4Hashes
3.5Ranges
3.6Symbols
3.7True,False,andNil
3.8Objects
4.ExpressionsandOperators
4.1LiteralsandKeywordLiterals
4.2VariableReferences
4.3ConstantReferences
4.4MethodInvocations
4.5Assignments
4.6Operators
5.StatementsandControlStructures
5.1Conditionals
5.2Loops
5.3IteratorsandEnumerableObjects
5.4Blocks
5.5AlteringControlFlow
5.6ExceptionsandExceptionHandling
5.7BEGINandEND
5.8Threads,Fibers,andContinuations
6.Methods,Procs,Lambflas,andClosures
6.1DefiningSimpleMethods
6.2MethodNames
6.3MethodsandParentheses
6.4MethodArguments
6.5ProcsandLambdas
6.6Closures
6.7MethodObjects
6.8FunctionalProgramming
7.ClassesandModules
7.1DefiningaSimpleClass
7.2MethodVisibility:Public,Protected,Private
7.3SubclassingandInheritance
7.4ObjectCreationandInitialization
7.5Modules
7.6LoadingandRequiringModules
7.7SingletonMethodsandtheEigenclass
7.8MethodLookup
7.9ConstantLookup
8.ReflectionandMetaprogramming
8.1Types,Classes,andModules
8.2EvaluatingStringsandBlocks
8.3VariablesandConstants
8.4Methods
8.5Hooks
8.6Tracing
8.7ObjectSpaceandGC
8.8CustomControlStructures
8.9MissingMethodsandMissingConstants
8.10DynamicallyCreatingMethods
8.11AliasChaining
8.12Domain-SpecificLanguages
9.TheRubyPlatform
9.1Strings
9.2RegularExpressions
9.3NumbersandMath
9.4DatesandTimes
9.5Collections
9.6FilesandDirectories
9.7Input/Output
9.8Networking
9.9ThreadsandConcurrency
10.TheRubyEnvironment
10.1InvokingtheRubyInterpreter
10.2TheTop-LevelEnvironment
10.3PracticalExtractionandReportingShortcuts
10.4CallingtheOS
10.5Security
Index
……