From: Shannon Fang Date: 2002-12-01T01:17:32+09:00 Subject: Ruby Document Hi All, I feel a little frustrated with Ruby's documentation. I like the companion book "The Pragmatic Programmer". However, it is apparently not good enough to be a online manual. May be because I'm completely new to Ruby. I just feel lost. The following is some of my questions. They are all related to Ruby's syntax. Please note that I am not currently interested in the logic of the following example, just simply what the syntax mean. 1. In httpmail-0.3/ruby/dav.rb: - class Unlock < ::Net::NetPrivate::HTTPRequest Q: what is the :: before Net mean? - define_http_method_interface :PropFind, true, true Q: what is the : before PropFind mean? From the menu I know that I can use attr_reader. It seems to me that attr_reader is a special directive. But from this example, define_http_method_interface seems a method. So I guess attr_reader is defined as a method in Object? Anyway, what is the colon before a variable mean? 2. In \ruby\lib\ruby\1.6\net\http.rb: - class << self Q: difference between << and < in class definition? - def HTTP.get( addr, path, port = nil ) Q: difference between HTTP.get and HTTP#get? I vaguely know there are a notation of class method and instance method, but which is which? and in a class, can I just say def get(...) without HTTP. ? I have a lot more similar questions. When I read the html help file, I can not use search to find any information! Could anyone please tell me how can I effectively find information about the GRAMMA of ruby? And please, if you know, explain the above syntax to me. Thanks a lot!!! Shannon