Ruby概述
Ruby是一种功能强大的面向对象的脚本语言,她可以使您方便快捷地进行面向对象编程.有时使用像Smalltalk、Eiffel或C++这样正式的面向对象语言来开发一些小项目显得有点"小题大作",而Ruby刚好可以满足这些面向对象编程的需求.当然了,您也可以使用Ruby进行普通的面向过程编程.
Ruby的文本处理能力极强,与Perl不分伯仲.同时,Ruby的语法简单,还有异常处理以及迭代器等构造,使编程变得简单明了.
简而言之,您可以像使用Perl一样方便快捷地进行面向对象的开发.怎么样?赶紧试一试吧!
Ruby是由松本行弘开发的免费软件.
Ruby的特长
- 语法简单
- 普通的面向对象功能(类,方法调用等)
- 特殊的面向对象功能(Mixin,特殊方法等)
- 操作符重载
- 错误处理功能
- 迭代器和闭包
- 垃圾回收
- 动态载入(取决于系统架构)
- 可移植性高.不仅可以运行在多数UNIX上,还可以运行在DOS,Windows,Mac,BeOS等平台上
分享到:
相关推荐
In this comprehensive guide to Ruby optimization, you'll learn how to write faster Ruby code--but that's just the beginning. See exactly what makes Ruby and Rails code slow, and how to fix it. Alex ...
In this comprehensive guide to Ruby optimization, you’ll learn how to write faster Ruby code–but that’s just the beginning. See exactly what makes Ruby and Rails code slow, and how to fix it. Alex...
The light and agile Ruby programming language remains a very popular open source scripting option for developers building today's web and even some enterprise applications. And, now, Ruby also has ...
and become familiar with Ruby's classes and objects. You'll learn to build Rails applications, connect to databases, perform necessary testing, and put the whole thing together to create real-world ...
### Ruby on Rails 2.1 新特性详解 #### 引言 自2004年7月David Heinemeier Hansson公开发布Ruby on Rails框架以来,这一轻量级且功能强大的Web开发框架迅速赢得了全球开发者们的青睐。经过三年多的发展与优化,在...
boy what 's wrong with you pry(main)> I.say.I.say.I.say ' ruby is awesome ' ruby is awesome pry(main)> Boy.I.say.boy "what' s with you and chunky bacon " what 's with you and chunky bacon pry(main)> ...
puts "Today's date: #{date}" # 输出:Today's date: Thu Sep 15 09:56:28 CDT 2023 ``` 6. **其他**:使用 `%q{}` 或 `%Q{}` 来创建不需要特殊处理的字符串,其中 `%q{}` 不会转义内部的任何特殊字符,而 `%Q{}...
总结来说,"what-game"是一个使用Ruby on Rails构建的视频游戏搜索和过滤平台,具有强大的搜索功能和愿望清单管理,展示了Rails的灵活性和效率。通过分析项目源代码,我们可以深入学习Rails框架的应用,以及如何设计...
If you don’t know what version to install and you’re getting started with Ruby, we recommend you use Ruby+Devkit 2.5.X (x64) installer. It provides the biggest number of compatible gems and installs...
- 询问某人状况:What's the matter with...? - 症状描述:He has a toothache(他牙痛)、He has a stomachache(他肚子痛)、He has a headache(他头疼)。 3. 颜色和物品的归属询问: - 询问颜色:What ...
适用于Ruby的XMPP DSL(以及更多),使用和。 特征 事件架构 使用Nokogiri 简化起点 项目页面 用法 安装 gem install blather 例子 Blather带有DSL,可让您轻松快捷地编写XMPP机器人。 有关更多高级示例,请参见...
Ruby TTY 是一个 Ruby 用来开发命令行应用的 Gems,示例代码: shell = TTY::Shell.new shell.ask "What is your name?" do argument :required default 'Piotr' validate /\w \s\w / valid ['...
you'll take your skills to the next level as you build a social networking app with more advanced Ruby tools, such as modules and metaprogramming, and advanced data modeling techniques within Rails's ...