[]

thr[sym] â obj or nil Instance Public methods Attribute ReferenceâReturns the value of a fiber-local variable (current thread's root fiber if not explicitely inside a Fiber), using either a symbol or a string name. If the specified variable does not exist, returns nil. [ Thread.new { Thread.current["name"] = "A" }, Thread.new { Thread.current[:name] = "B" }, Thread.new { Thread.current["name"] = "C" } ].each do |th| th.join puts "#{th.inspect}: #{th[:name]}" end prod

file_field

file_field(name = "", size = 20, maxlength = nil) Instance Public methods Generate an File Upload Input element as a string. The attributes of the element can be specified as three arguments, name, size, and maxlength. maxlength is the maximum length of the file's name, not of the file's contents. Alternatively, the attributes can be specified as a hash. See multipart_form() for forms that include file uploads. file_field("name") # <INPUT TYPE="file" NAME="name" SIZE="20">

new

Class.new(super_class=Object) â a_classClass.new(super_class=Object) { |mod| ... } â a_class Class Public methods Creates a new anonymous (unnamed) class with the given superclass (or Object if no parameter is given). You can give a class a name by assigning the class object to a constant. If a block is given, it is passed the class object, and the block is evaluated in the context of this class using class_eval. fred = Class.new do def meth1 "hello" end de

create_pie

create_pie(hh, mm, span, color='red') Instance Public methods

polar 2

cmp.polar â array Instance Public methods Returns an array; [cmp.abs, cmp.arg]. Complex(1, 2).polar #=> [2.23606797749979, 1.1071487177940904]

&lt;=

flt Instance Public methods true if flt is less than or equal to real. The result of NaN <= NaN is undefined, so the implementation-dependent value is returned.

entitydecl

entitydecl(content) Instance Public methods <!ENTITY â¦> The argument passed to this method is an array of the entity declaration. It can be in a number of formats, but in general it returns (example, result): <!ENTITY % YN '"Yes"'> ["%", "YN", "'\"Yes\"'", "\""] <!ENTITY % YN 'Yes'> ["%", "YN", "'Yes'", "s"] <!ENTITY WhatHeSaid "He said %YN;"> ["WhatHeSaid", "\"He said %YN;\"", "YN"] <!ENTITY open-hatch SYSTEM "http://www.textuality.com/boilerplate/Open

config_accessor

config_accessor(*names) Instance Public methods Allows you to add shortcut so that you don't have to refer to attribute through config. Also look at the example for config to contrast. Defines both class and instance config accessors. class User include ActiveSupport::Configurable config_accessor :allowed_access end User.allowed_access # => nil User.allowed_access = false User.allowed_access # => false user = User.new user.allowed_access # => false user.allowed_acces

thread_list_all

thread_list_all() Class Public methods

quote_table_name_for_assignment

quote_table_name_for_assignment(table, attr) Instance Public methods