dimanche, janvier 29, 2006

[Rails] Les mots clefs a ne pas utiliser (c.à.d les mots réservés)

Un petit script pour connaître les mots réservés:
>ruby -r config/environment -e 'print Object.constants.sort.join(", ")'
Résultat:
ARGF, ARGV, ActionController, ActionMailer, ActionPack, ActionView, ActionWebSer
vice, ActiveRecord, ActiveSupport, ArgumentError, Array, BREAKPOINT_SERVER_PORT,
 Base64, BasicSocket, Benchmark, Bignum, Binding, Buffering, Builder, CGI, CGIMe
thods, CROSS_COMPILING, Class, ClassInheritableAttributes, Comparable, Condition
Variable, Config, Continuation, Controllers, DRb, DRbIdConv, DRbObject, DRbUndum
ped, Data, Date, DateTime, Delegater, Delegator, Dependencies, Deprecated, Diges
t, Dir, ENV, EOFError, ERB, Enumerable, Errno, Exception, FALSE, FalseClass, Fcn
tl, File, FileTest, FileUtils, FireRuby, Fixnum, Float, FloatDomainError, Forwar
dable, GC, Gem, HTML, Hash, HashWithIndifferentAccess, IO, IOError, IPSocket, IP
socket, IndexError, Inflector, Integer, Interrupt, Kconv, Kernel, LoadError, Loc
alJumpError, Logger, MailHelper, Marshal, MatchData, MatchingData, Math, Method,
 MissingSourceFile, Module, Mutex, Mutex_m, NIL, NKF, NQXML, NameError, Net, Nil
Class, NoMemoryError, NoMethodError, NotImplementedError, Numeric, Object, Objec
tSpace, Observable, OpenSSL, OrderedOptions, PLATFORM, PStore, ParseDate, ParseE
rror, Pathname, Precision, Proc, Process, Queue, RAILS_CONNECTION_ADAPTERS, RAIL
S_DEFAULT_LOGGER, RAILS_ENV, RAILS_ROOT, RAILTIES_PATH, RELEASE_DATE, REXML, RUB
Y_PLATFORM, RUBY_RELEASE_DATE, RUBY_VERSION, Racc, Rails, Range, RangeError, Rat
ional, Regexp, RegexpError, RuntimeError, SOAP, STDERR, STDIN, STDOUT, ScanError
, ScriptError, SecurityError, Set, Signal, SignalException, SimpleDelegater, Sim
pleDelegator, SingleForwardable, Singleton, SizedQueue, Socket, SocketError, Sor
tedSet, StandardError, String, StringIO, StringInput, StringOutput, StringScanne
r, Struct, Symbol, SyntaxError, SystemCallError, SystemExit, SystemStackError, T
CPServer, TCPSocket, TCPserver, TCPsocket, TMail, TOPLEVEL_BINDING, TRUE, Text,
Thread, ThreadError, ThreadGroup, Time, TimeZone, Timeout, TimeoutError, Transac
tion, TrueClass, TypeError, UDPSocket, UDPsocket, URI, UnboundMethod, VERSION, W
in32API, XML, XMLEncoding, XMLParser, XMLParserError, XMLRPC, XSD, XmlSimple, YA
ML, ZeroDivisionError, Zlib
Vu sur: Gotcha du wiki ruby on rails
Technorati tags:

Aucun commentaire: