Returns the paths to the source files for use with analysis and documentation tools. These paths are relative to full_gem_path.
Ensure that the dependency is satisfied by the current installation of gem. If it is not an exception is raised.
Writes the .gemspec specification (in Ruby) to the gem home’s specifications directory.
Verifies entry
in a .gem file.
Verifies the files of the gem
Resolve the requested dependencies against the gems available via Gem.path
and return an Array of Specification objects to be activated.
Yields each source in the list.
Return the list of all array-oriented instance variables.
Return the list of all instance variables.
Is name
a required attribute?
Required specification attributes
Sanitize a single string.
Returns the full path to this spec’s ri directory.
True if this gem has the same attributes as other
.
Writes a binary file to path
which is relative to +@gemhome+
Given a gem file’s contents, validates against its own MD5 checksum
Contents of the gem file
Returns true
, if the arity of obj
matches n_args
Returns the source encoding as an encoding object.
Note that the result may not be equal to the source encoding of the encoding converter if the conversion has multiple steps.
ec = Encoding::Converter.new("ISO-8859-1", "EUC-JP") # ISO-8859-1 -> UTF-8 -> EUC-JP begin ec.convert("\xa0") # NO-BREAK SPACE, which is available in UTF-8 but not in EUC-JP. rescue Encoding::UndefinedConversionError p $!.source_encoding #=> #<Encoding:UTF-8> p $!.destination_encoding #=> #<Encoding:EUC-JP> p $!.source_encoding_name #=> "UTF-8" p $!.destination_encoding_name #=> "EUC-JP" end
Returns the source encoding as an encoding object.
Note that the result may not be equal to the source encoding of the encoding converter if the conversion has multiple steps.
ec = Encoding::Converter.new("ISO-8859-1", "EUC-JP") # ISO-8859-1 -> UTF-8 -> EUC-JP begin ec.convert("\xa0") # NO-BREAK SPACE, which is available in UTF-8 but not in EUC-JP. rescue Encoding::UndefinedConversionError p $!.source_encoding #=> #<Encoding:UTF-8> p $!.destination_encoding #=> #<Encoding:EUC-JP> p $!.source_encoding_name #=> "UTF-8" p $!.destination_encoding_name #=> "EUC-JP" end