file_field

file_field(object_name, method, options = {}) Instance Public methods Returns a file upload input tag tailored for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object). Additional options on the input tag can be passed as a hash with options. These options will be tagged onto the HTML as an HTML element attribute as in the example shown. Using this method inside a form_for block will set the enclosing form's encoding to

new

new(*) Class Public methods

pretty_name

pretty_name() Instance Public methods Alias for: pretty_new_name

[]

[](key) Instance Public methods

validateOnParse

validateOnParse() Instance Public methods BOOL validateOnParse indicates whether the parser performs validation

write

IO.write(name, string, [offset] ) => fixnumIO.write(name, string, [offset], open_args ) => fixnum Class Public methods Opens the file, optionally seeks to the given offset, writes string, then returns the length written. write ensures the file is closed before returning. If offset is not given, the file is truncated. Otherwise, it is not truncated. If the last argument is a hash, it specifies option for internal open(). The key would be the following. open_args: is ex

advise

ios.advise(advice, offset=0, len=0) â nil Instance Public methods Announce an intention to access data from the current file in a specific pattern. On platforms that do not support the <em>posix_fadvise(2)</em> system call, this method is a no-op. advice is one of the following symbols: * :normal - No advice to give; the default assumption for an open file. * :sequential - The data will be accessed sequentially: with lower offsets read before higher ones. * :random

_add_tk_procs

_add_tk_procs(name, args, body) Instance Public methods

lineno

ios.lineno â integer Instance Public methods Returns the current line number in ios. The stream must be opened for reading. lineno counts the number of times gets is called rather than the number of newlines encountered. The two values will differ if gets is called with a separator other than newline. Methods that use $/ like each, lines and readline will also increment lineno. See also the $. variable. f = File.new("testfile") f.lineno #=> 0 f.gets #=> "This is l

stop

stop() Instance Public methods Stops the server from accepting new connections.