Get the configuration of the current server.
If there is no current server, this returns the default configuration. See current_server
and DRbServer::make_config.
If src
is not same as dest
, copies it and changes the permission mode to mode
. If dest
is a directory, destination is dest
/src
. This method removes destination before copy.
FileUtils.install 'ruby', '/usr/local/bin/ruby', mode: 0755, verbose: true FileUtils.install 'lib.rb', '/usr/local/lib/ruby/site_ruby', verbose: true
If src
is not same as dest
, copies it and changes the permission mode to mode
. If dest
is a directory, destination is dest
/src
. This method removes destination before copy.
FileUtils.install 'ruby', '/usr/local/bin/ruby', mode: 0755, verbose: true FileUtils.install 'lib.rb', '/usr/local/lib/ruby/site_ruby', verbose: true
Returns an Array
of option names.
p FileUtils.options #=> ["noop", "force", "verbose", "preserve", "mode"]
Returns the singleton instance.
Callback invoked whenever the receiver is included in another module or class. This should be used in preference to Module.append_features
if your code wants to perform some action when a module is included in another.
module A def A.included(mod) puts "#{self} included in #{mod}" end end module Enumerable include A end # => prints "A included in Enumerable"
Returns a new lazy enumerator with the concatenated results of running block
once for every element in the lazy enumerator.
["foo", "bar"].lazy.flat_map {|i| i.each_char.lazy}.force #=> ["f", "o", "o", "b", "a", "r"]
A value x
returned by block
is decomposed if either of the following conditions is true:
x
responds to both each and force, which means that x
is a lazy enumerator.
x
is an array or responds to to_ary.
Otherwise, x
is contained as-is in the return value.
[{a:1}, {b:2}].lazy.flat_map {|i| i}.force #=> [{:a=>1}, {:b=>2}]
Is this specification missing its extensions? When this returns true you probably want to build_extensions
Returns path to the extensions directory.
Indicated, based on the requested domain, if local gems should be considered.
Builds extensions. Valid types of extensions are extconf.rb files, configure scripts and rakefiles or mkrf_conf files.
Creates or an HTTP connection based on uri
, or retrieves an existing connection, using a proxy if needed.
Private setter for extensions val
.
Returns the destination encoding as an encoding object.
Returns the destination encoding as an encoding object.
Returns the destination encoding as an Encoding
object.
Consumes size bytes from the buffer