2007-12-26

Ruby 在 Notepad++ 上飞翔

关键字: ruby rails notepad++ ide
1.notepad++ 简单介绍   notepad++可能大家都不陌生吧,它是一个很强大的编辑器,它的特性是,开放源代码, 支持多语言的,但是它目前只能运行在Windows平台下(缺点,都4.6的版本,还没看到能在其他os上的版本)。大家用过ruby下自带的SciTE吧,它使用的是 Scintilla edit component ,其实官方网站上说 SciTE本来只是作为Scintilla edit component 推广用的一个Demo。呵呵,notepad++也使用Scintilla edit component,所以感觉像是2兄弟。     n ...
大家先看下面代码: class Person < Struct.new(:age) def say_age puts "say age: #{age}" if age != nil end def hello_age puts "hello age: #{age}" if age!=nil end end p = Person.new(30) p.say_age p.hello_age p.age = 20 p.say_age p.hello_age 输出是: say age: 30 hello age: 30 say ...
2007-12-21

migrate 中 create_table 的初步探索

关键字: migrate create_table
搞了几天rails了,太magic了。所以搞不清楚,只知道调用。 今天深入去了解了下 create_table 大家给指点指点 先请看流程: 再看 SchemaStatement 类的create_table()代码 ruby 代码   # ====== Do not add a primary key column   #  create_table(:categories_suppliers, :id& ...
lemonzc
搜索本博客
博客分类
最近加入圈子
最新评论