书籍详情

学习Ruby(影印版)

学习Ruby(影印版)

作者:(美)菲茨杰拉德(Fitzgerald,M.) 著

出版社:东南大学出版社

出版时间:2007-11-01

ISBN:9787564109639

定价:¥29.00

购买这本书可以去
内容简介
  正如您在开车的时候,并不需要知道关于汽车的一切;当您开始使用Ruby进行编程的时候,也不需要立刻了解关于Ruby的一切。无论对于Ruby的新手还是老手,《学习Ruby》都是一本即学即用的实用教材。它提供了非常多的Ruby程序,并且解释了这些程序如何运行以及这样运行的原因。这些内容已经足以让您开始您的Ruby之旅。由于网络开发框架Ruby on Rails的流行和大受欢迎,Ruby已经引起了很多Java和PHP开发人员的兴趣。但除了Rails之外,Ruby还有其他广泛的用途,而学习这些用法的最好方法就是动手尝试编写代码。在本书中,几乎每一页都可以找到代码例子。您可以仿照或者改写这些例子,生成您自己的代码。本书包含以下主题:* 介绍Ruby最重要的功能特性* 示例说明如何使用条件语句以及如何使用Ruby字符串..* 涵盖正则表达式* 解释如何使用Ruby的操作符、有理数、算术表达式以及Math模块的函数* 详细介绍Ruby数组和hash功能* 讲解使用Ruby进行文件处理* 对Ruby类和mixin模块的细节展开讨论,包括对面向对象编程的简要介绍* 介绍XML处理、Tk工具包、RubyGems、反射机制(reflection)、RDoc、嵌入式Ruby、元编程(metaprogramming)、异常处理等内容* 让您掌握Rails的基本知识,包括一个Rails的简单教程每一章都有一组问题回顾,附录中有Ruby编程的名词对照表和书中用到的参考资料的出处。如果您想带着Ruby开车兜风,那么《学习Ruby》就是您的车钥匙。
作者简介
  Michael Fitzgerald是一位有20多年经验的程序员和作者,他认为Ruby是到目前为止他最喜爱的编程语言。Michael还是《Learning XSLT》《XML hacks》《Ruby Pocket Reference》的作者,也是《XML Pocket Reference》的作者之一。以上提到的书籍均由O'Reilly出版。
目录
Preface 1. Ruby Basics Hello, Matz Interactive Ruby Resources Installing Ruby Permission Denied Associating File Types on Windows Review Questions 2. A Quick Tour of Ruby Ruby Is Object-Oriented Ruby's Reserved Words Comments Variables Strings Numbers and Operators Conditional Statements Arrays and Hashes Methods Blocks Symbols Exception Handling Ruby Documentation Review Questions 3. Conditional Love The if Statement The case Statement The while Loop The loop Method The for loop Execution Before or After a Program Review Questions 4. Strings Creating Strings Concatenating Strings Accessing Strings Comparing Strings Manipulating Strings Case Conversion Managing Whitespace, etc. Incrementing Strings Converting Strings Regular Expressions 1.9 and Beyond Review Questions 5. Math Class Hierarchy and Included Modules Converting Numbers Basic Math Operations Ranges Inquiring About Numbers More Math Methods Math Functions Rational Numbers Prime Numbers Review Questions 6. Arrays Creating Arrays Accessing Elements Concatenation Set Operations Unique Elements Blow Your Stack Comparing Arrays Changing Elements Deleting Elements Arrays and Blocks Sorting Things and About Face Multidimensional Arrays 1.9 and Beyond Other Array Methods Review Questions 7. Hashes Creating Hashes Accessing Hashes Iterating over Hashes Changing Hashes Converting Hashes to Other Classes 1.9 and Beyond Other Hash Methods Review Questions 8. Working with Files Directories Creating a New File Opening an Existing File Deleting and Renaming Files File Inquiries Changing File Modes and Owner The IO Class Review Questions 9. Classes Defining the Class Instance Variables Accessors Class Variables Class Methods Inheritance Modules public, private, or protected Review Questions 10. More Fun with Ruby Formatting Output with sprintf Processing XML Date and Time Reflection Using Tk Metaprogramming RubyGems Exception Handling Creating Documentation with RDoc Embedded Ruby Review Questions 11. A Short Guide to Ruby on Rails Where Did Rails Come From? Why Rails? What Have Other Folks Done with Rails? Hosting Rails Installing Rails Learning Rails A Brief Tutorial Review Questions A. Ruby Reference B. Answers to Review QuestionsGlossaryIndex
猜您喜欢

读书导航