开发工具:
文件大小: 1mb
下载次数: 0
上传时间: 2010-01-09
详细说明: 自序..................................................................................................................................................3 第一章概述...................................................................................................................................4 1.1 编程语言的发展简史......................................................................................................4 1.2 编程其实很容易..............................................................................................................7 1.3 Ru by的由来.....................................................................................................................8 1.4 Ruby的特性.....................................................................................................................9 第二章............................................................................................................................................11 2.1 下载Ruby 1.8.5..............................................................................................................11 2.2 安装Ruby 1.8.5 for Windows ........................................................................................12 2.3 开始第一个小程序........................................................................................................14 2.4 Ruby语言的集成开发环境...........................................................................................17 第三章语法快览.........................................................................................................................18 3.1 注释与分行....................................................................................................................18 3.2 分隔符............................................................................................................................20 3.3 关键字............................................................................................................................21 3.4 运算符............................................................................................................................23 3.5 标识名和变量的作用域................................................................................................25 3.6 类库................................................................................................................................26 3.7 数据类型........................................................................................................................27 3.8 赋值和条件运算符........................................................................................................28 3.9 条件判断语句................................................................................................................30 一. 单行if(如果)语句...........................................................................................30 二. 多行if 语句...........................................................................................................30 三. unless(除非) 条件语句:........................................................................................30 四. case分支条件语句....................................................................................................31 3.10 循环语句......................................................................................................................32 一. while(当…)循环................................................................................................32 二. 单行while 循环.....................................................................................................32 三. until(直到…)循环...........................................................................................32 四. for…in 循环.............................................................................................................33 五.break ,next & redo & retry ....................................................................33 六. 求50 以内的素数。................................................................................................36 七. times , upto , downto , each ,step ..............................................................................37 3.11 异常与线程..................................................................................................................38 3.12 一个综合小练习..........................................................................................................39 第四章一切都是对象.................................................................................................................40 4.1 两种思维方式................................................................................................................40 4.2 对象................................................................................................................................41 4.3 封装................................................................................................................................43 4.4 继承................................................................................................................................45 4.5 多态................................................................................................................................47 第五章............................................................................................................................................48 5.1 为什么是Ruby?...........................................................................................................48 5.2 Ruby会长久么?...........................................................................................................49 5.3 详解变量—— 动态类型..............................................................................................51 5.4 蓝图可以改变吗?——动态语言............................................................................55 5.5 一些编码建议.............................................................................................................57 第六章深入面象对象...............................................................................................................61 6.1 重载?重写....................................................................................................................61 6.2 增强父类方法................................................................................................................65 6.3 实例变量、类变量、类方法........................................................................................67 6.4 单例方法........................................................................................................................71 6.5 访问控制........................................................................................................................73 第七章............................................................................................................................................79 7.1 模块................................................................................................................................79 7.2 命名空间........................................................................................................................80 7.3 糅和(Mix-in) 与多重继承............................................................................................83 7.4 require 和load ..............................................................................................................86 第八章............................................................................................................................................88 8.1 再说数组........................................................................................................................88 8.2 再说字符串....................................................................................................................93 8.3 正则表达式....................................................................................................................97 8.4 迭代器、代码块、闭包..............................................................................................103 第九章元编程.......................................................................................................................109 小跋..............................................................................................................................................112 ...展开收缩
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.