A
arose
I'm reading Why's (Poingnant) Guid to Ruby chapter 3.
Class methods vs. Instance methods is mentioned.
This is what he says:
class methods are usually attached after variables and constants.
Rather than a dot, a double colon is used.
Door::new( ak )
I talked some in this group about a little program I wrote.
g=File.open(readfile,"r")
g.each_line {|readline| File.new((readline).chomp, "w")}
Now File is a class correct?
Why not File::new in the second line of code above?
Class methods vs. Instance methods is mentioned.
This is what he says:
class methods are usually attached after variables and constants.
Rather than a dot, a double colon is used.
Door::new( ak )
I talked some in this group about a little program I wrote.
g=File.open(readfile,"r")
g.each_line {|readline| File.new((readline).chomp, "w")}
Now File is a class correct?
Why not File::new in the second line of code above?