create_makefile

create_makefile(target, srcprefix = nil) Instance Public methods Generates the Makefile for your extension, passing along any options and preprocessor constants that you may have generated through other methods. The target name should correspond the name of the global function name defined within your C extension, minus the Init_. For example, if your C extension is defined as Init_foo, then your target would simply be âfooâ. If any â/â characters are present in the target name, o

request_uri

request_uri() Instance Public methods Description Returns the full path for an HTTP request, as required by Net::HTTP::Get. If the URI contains a query, the full path is URI#path + '?' + URI#query. Otherwise, the path is simply URI#path.

show_now

show_now() Instance Public methods

gsub

gsub(pattern, replacement) â stringgsub(pattern) {|...| block } â string Instance Public methods Equivalent to $_.gsub..., except that $_ receives the modified result. Available only when -p/-n command line option specified.

popup_menu

popup_menu(name = "", *values) Instance Public methods Generate a Select element as a string. name is the name of the element. The values are the options that can be selected from the Select menu. Each value can be a String or a one, two, or three-element Array. If a String or a one-element Array, this is both the value of that option and the text displayed for it. If a three-element Array, the elements are the option value, displayed text, and a boolean value specifying whether

selection_toggle

selection_toggle(*items) Instance Public methods

full_name

full_name() Instance Public methods

calculate_ip

calculate_ip() Instance Public methods Sort through the various IP address headers, looking for the IP most likely to be the address of the actual remote client making this request. REMOTE_ADDR will be correct if the request is made directly against the Ruby process, on e.g. Heroku. When the request is proxied by another server like HAProxy or Nginx, the IP address that made the original request will be put in an X-Forwarded-For header. If there are multiple proxies, that header ma

addr

ipsocket.addr([reverse_lookup]) => [address_family, port, hostname, numeric_address] Instance Public methods Returns the local address as an array which contains address_family, port, hostname and numeric_address. If reverse_lookup is true or :hostname, hostname is obtained from numeric_address using reverse lookup. Or if it is false, or :numeric, hostname is same as numeric_address. Or if it is nil or ommitted, obeys to ipsocket.do_not_reverse_lookup. See Socket.getaddrinfo al

peeraddr

ipsocket.peeraddr([reverse_lookup]) => [address_family, port, hostname, numeric_address] Instance Public methods Returns the remote address as an array which contains address_family, port, hostname and numeric_address. It is defined for connection oriented socket such as TCPSocket. If reverse_lookup is true or :hostname, hostname is obtained from numeric_address using reverse lookup. Or if it is false, or :numeric, hostname is same as numeric_address. Or if it is nil or ommitte