课程简介:
Ruby培训课程涵盖了Ruby编程语言的基本组成部分。课程重点为Ruby的面向对象特性,包括数组、Hashes、正则表达式、IO、异常、模块和应用领域。
培训对象:
有一种或以上编程语言基础的程序员。包括,但不限于:C,C++,Java或Perl等。
预备知识:
学生应该有至少六个月至少的某种开发语言的编程经验。
培训内容:
1. An Introduction to Ruby
- What is Ruby?
 - Installing Ruby
 - Executing Ruby Code
 - Getting Help
 - Dynamic Types
 - Ruby Reserved Words
 - Naming Conventions
 
2. Standard Ruby Data Types
- Numbers
 - Strings
 - Simple Input and Output
 - Converting String Input
 - Regular Expressions
 - Time Methods
 
3. Language Components
- The if Statement
 - The case Construct
 - Loops
 - Iterators
 - Numeric Iterators
 - String Iterators
 - Methods
 - Odds and Ends
 
4. Collections
- Arrays
 - Array Operator Methods
 - Array Equality Operator
 - Arrays as Stacks and Queues
 - Higher Dimensional Arrays
 - Other Useful Arrays Methods
 - Command Line Arguments
 - Hashes
 - Common Hash Methods
 - Sorting Hashes
 - Iterators with Arrays and Hashes
 - Arrays and Methods
 - Hashes and Methods
 - Named Parameters
 - Symbols
 - Procs
 - Closures
 
5. Classes
- Objects
 - Brief History of OOP
 - OOP Vocabulary
 - Creating a New Class
 - Using Objects
 - Defining Operator Methods
 - Inheritance
 - Ancestors
 - self
 - Access Levels – public
 - Access Levels – private
 - Access Levels – protected
 - Access Levels – Specification
 - Class Data and Class Methods
 - Adding Methods to Classes and Objects
 - Special Global Variables
 - Scope of Variables
 - Built-in Classes
 - The Math Class
 - The NilClass Class
 - TrueClass and FalseClass
 - Built-in Class Hierarchy
 
6. Input and Output
- Introduction
 - Reading from the Standard Input
 - Reading a Character at a Time
 - Writing to the Standard Output
 - Reading and Writing Disk Files
 - Reading Files Using Iterators
 - I/O With Command Line Commands
 - Seeking About Files
 - tell
 - Capturing Data About Files
 - Processing Directories
 
7. Exceptions
- Introduction
 - Exception Hierarchy
 - Handling Exceptions
 - Multiple Rescue Clauses
 - Exceptions are Classes
 - ensure
 - retry
 - raise
 - Creating Your Own Exceptions
 - catch and throw
 
8. Modules
- Introduction
 - Using Core Ruby Classes
 - Ruby Standard Library
 - require
 - Search Path
 - File Organization
 - load
 - Modules
 - include
 - Mixins
 - Using the Comparable Module
 - Collection Classes
 - yield
 - Using the Enumerable Module
 
9. Odds and Ends
- Ruby Conventions
 - Bit Manipulation
 - Substituting
 - Marshalling
 - Reflection
 - grep
 - Classes are Objects
 - Aliasing
 - Testing
 - Test::Unit::TestCase
 - Testing Your Own Classes
 - Freezing Objects
 - Object Equality
 
培训天数:
3天
后续课程:
Ruby on Rails开发培训课程
在线咨询
提示:系统优先提供真人服务。非工作时间或繁忙时,会由 AI 生成回答,可能存在错误,请注意甄别。

		