Results for: "gsub"

No documentation available

Ensure that the dependency is satisfied by the current installation of gem. If it is not an exception is raised.

spec

Gem::Specification

dependency

Gem::Dependency

No documentation available

Adds a checksum for each entry in the gem to checksums.yaml.gz.

Reads and loads checksums.yaml.gz from the tar file gem

No documentation available

Returns a Gem::StubSpecification for default gems

Returns a Gem::StubSpecification for installed gem named name only returns stubs that match Gem.platforms

Returns the build_args used to install the gem

Return a string containing a Ruby code representation of the given object.

Returns a Ruby code representation of this specification, such that it can be eval’ed and reconstruct the same specification later. Attributes that still have their default values are omitted.

No documentation available
No documentation available

Consumes size bytes from the buffer

No documentation available

Simple deprecation method that deprecates name by wrapping it up in a dummy method. It warns on each call to the dummy method telling the user of repl (unless repl is :none) and the Rubygems version that it is planned to go away.

Simple deprecation method that deprecates name by wrapping it up in a dummy method. It warns on each call to the dummy method telling the user of repl (unless repl is :none) and the Rubygems version that it is planned to go away.

No documentation available

Message to promote available RubyGems update with related gem update command.

Returns a list of the public instance methods defined in mod. If the optional parameter is false, the methods of any ancestors are not included.

Similar to instance_method, searches public method only.

Returns true if the named public method is defined by mod. If inherit is set, the lookup will also search mod’s ancestors. String arguments are converted to symbols.

module A
  def method1()  end
end
class B
  protected
  def method2()  end
end
class C < B
  include A
  def method3()  end
end

A.method_defined? :method1                 #=> true
C.public_method_defined? "method1"         #=> true
C.public_method_defined? "method1", true   #=> true
C.public_method_defined? "method1", false  #=> true
C.public_method_defined? "method2"         #=> false
C.method_defined? "method2"                #=> true

Makes a list of existing class methods public.

String arguments are converted to symbols. An Array of Symbols and/or Strings is also accepted.

Checks if a given hash is flagged by Module#ruby2_keywords (or Proc#ruby2_keywords). This method is not for casual use; debugging, researching, and some truly necessary cases like serialization of arguments.

ruby2_keywords def foo(*args)
  Hash.ruby2_keywords_hash?(args.last)
end
foo(k: 1)   #=> true
foo({k: 1}) #=> false

Duplicates a given hash and adds a ruby2_keywords flag. This method is not for casual use; debugging, researching, and some truly necessary cases like deserialization of arguments.

h = {k: 1}
h = Hash.ruby2_keywords_hash(h)
def foo(k: 42)
  k
end
foo(*[h]) #=> 1 with neither a warning or an error
Search took: 1ms  ·  Total Results: 282