Ruby
iteye_19562
这个作者很懒,什么都没留下…
展开
-
Everyday OOP Tasks in <Ruby Way>
Recently,I'm reading the book.Some people said that the book is suitable for someone who have some experience in Ruby and they must be right.Because there aren't any words to explain how to develop a...2007-12-05 11:49:58 · 100 阅读 · 0 评论 -
Special characters in regular expression
There are some special characters in Regular Expressions.Within a pattern,all characters except .,|,(,),[,],{,},+,\,^,$,*,and ? match themselves.They are the special characters.If you know their meani...2007-11-08 15:46:07 · 131 阅读 · 0 评论 -
I bought the Chinese version of Programming Ruby
Yesterday morning,When I read the 4.2.3 chapter of the ruby book named <Programming Ruby>,I couldn't understand the meaning of this chapter.I have been reading this book for 2 weeks,but I only r...2007-11-06 08:33:03 · 95 阅读 · 0 评论 -
Iterators in Ruby
Up to now,I know four iterator methods.They are each,find,collect and inject.The each method access every element in collections and pass each element to the block which is defined by two braces or ...2007-11-05 10:03:02 · 82 阅读 · 0 评论 -
Block
There are something about Block which need be noted.First,if the parameters to a block are existing local variables,those variables will be used as the block parameters,and their values may be change...2007-11-02 16:52:21 · 78 阅读 · 0 评论 -
Three method define class methods
The following all define class methods within class Demo.ruby 代码 class Demo def Demo.meth1 # ... end def self.meth2 # ... end ...2007-11-01 15:58:18 · 87 阅读 · 0 评论 -
Singleton pattern in Ruby
The following is the singleton pattern in Ruby:ruby 代码 class Singleton private_class_method :new @@instance = nil def Singleton.instance ...2007-11-01 15:28:24 · 99 阅读 · 0 评论 -
Attributes in Ruby
Attribute is a very useful propety in Ruby.It like the 'get/set' method in Java and the 'property' in C#,but it is easier and more useful than these language.For example,in Java language you need writ...2007-11-01 11:57:11 · 81 阅读 · 0 评论 -
Blocks in Ruby
At the begin of studying Ruby,I knew that you can write the following codes to print an object 3 times: 3.times {print "*"}or print the number fr...2007-10-31 14:15:02 · 75 阅读 · 0 评论 -
Start to read <Pragmatic.Programmers.Programming.Ruby.2nd>
I started to study ruby a few days ago and recently was reading an openDoc of ruby named "Ruby语言入门教程v1.0" which was wrote by zhang kaichuan.It is a very good book and from this book I know some basic...2007-10-31 10:04:16 · 173 阅读 · 0 评论 -
ActiveRecord
1. Table and classBydefault,Active Record assumes that the name of the table is the plural form ofthe name of the class.But you can specify the name of the table which the classis cor...2008-01-14 15:28:24 · 119 阅读 · 0 评论 -
Migration
1、Generate migrationsl You can use the “rubyscript/generate model model-name” command to generate model and the correspondingmigration file.l You can also generate amigration o...2008-01-08 10:25:58 · 127 阅读 · 0 评论 -
Change your netbeans configuration
This method was wrote by dcaoyuan in one of his blogs.Open the nbrubyide.conf file(in etc directory) and change the default_options value to:default_options="-J-Xms32m -J-Xmx128m -J-XX:PermSize=...2008-01-03 16:07:33 · 110 阅读 · 0 评论 -
An interesting helper of Rails
"pluralize" is a very insteresting helper of Rails,but it may be not very useful.It can return the plural word of what you pass into it.I have tested the 'knife' word and it returned the right answer:...2007-12-28 16:26:44 · 71 阅读 · 0 评论 -
Thread in Ruby(1)
Thread is a very important concept in every computer language,for example in java,in c++ or in c.So Ruby have its own Thread concept.[b]Create a new Thread[/b]If you want to create a new threa...2007-12-07 16:06:28 · 111 阅读 · 0 评论 -
AspectR
The concept of aspect-oriented programming (AOP) is an interesting one. In AOP, we try to deal with programming issues that crosscut the modular structure of the program. In other words, some activiti...2007-12-05 17:28:04 · 73 阅读 · 0 评论 -
The append_features method of Module
In the same way that the class could include some singleton methods,the Module could include some singleton methods,too.But if we implement a class which include a Module which contians some singleton...2007-12-05 15:09:18 · 73 阅读 · 0 评论 -
The Link of NetBeans Ruby IDE
http://deadlock.netbeans.org/hudson/job/ruby/2007-11-20 19:43:09 · 96 阅读 · 0 评论