The beginning of our point and click glossary to ruby - we'll see how it goes. We'd like to see some form of feature in the RDOC stuff with user contributions like the PHP manual and if we ever get round to it (unlikely) we'll do some more thinking. If the item below has got a link read it - otherwise put up with our definition. You have been warned.
Select from the range below:
Symbols ?, #, ::, etc. | a - d | e - l | m - r | s - z
term | parent | description |
? | Core API | At the end of a test e.g. has_key? indicates ruby will return a boolean ( 0 = false) else return normal ruby response e.g. 0 = true. This is called a predictate method. |
# | Core API | Used in a string to embed a variable e.g. #{varname} |
:: | Core API | Confusing - well to us (so what's new). Can be used as an alias for '.' but if a class is embedded in a class (a sub-class) then the :: syntax must be used to differentiate from a method. Example:
myinst.each {|x| print x} # exactly the same as myinst::each {|x| print x} # where each is a method (uses 'def') # use in a sub-class class Thing class One end end # is invoked by inst = Thing::One.new # if you use Thing.One it will look for a method |
% | Core API | Defines a literal - enclose in []<>() {}:
%q single quoted string %Q double quoted string %w array of tokens %r regular expression %x shell command |
<< | Core API | Append (to a file or array)
myarray << 1 # add new element to array mystring << "add" # faster that mystring += "add" |
< | Core API | Inherit class methods
class Two ... end class One < Two # class One inherits all the methods of class Two # plus its own methods ... end |
Select from the range below:
Symbols ?, #, ::, etc. | a - d | e - l | m - r | s - z
Problems, comments, suggestions, corrections (including broken links) or something to add? Please take the time from a busy life to 'mail us' (at top of screen), the webmaster (below) or info-support at zytrax. You will have a warm inner glow for the rest of the day.
Tech Stuff
If you are happy it's OK - but your browser is giving a less than optimal experience on our site. You could, at no charge, upgrade to a W3C standards compliant browser such as Firefox
Main Ruby site
Ruby extensions
The Book
Ruby Central.org
ruby-doc.org
Ruby Gargen
RCArchive
rubyxml
RubyGems
Ruby on Rails
Site
Copyright © 1994 - 2024 ZyTrax, Inc. All rights reserved. Legal and Privacy |
site by zytrax hosted by javapipe.com |
web-master at zytrax Page modified: January 20 2022. |