Returns true if the element contains inline content that has a XML media type.
Returns true if the element contains inline content encoded in base64.
Processes the topmost available {RequirementState} on the stack @return [void]
@return [ResolutionState] the state whose ‘requirement` is the given
`requirement`.
Returns the string that is used to indent levels in the JSON text.
Sets the string that is used to indent levels in the JSON text.
Is this tar entry a symlink?
Rewinds to the beginning of the tar file entry
Writes data onto the IO, raising a FileOverflow exception if the number of bytes will be more than limit
Writes data onto the IO
@return [String] a string suitable for debugging
Re-composes a prime factorization and returns the product.
See Prime#int_from_prime_division for more details.
Same as Enumerator#with_index(0), i.e. there is no starting offset.
If no block is given, a new Enumerator is returned that includes the index.
Returns the Ruby source filename and line number containing first definition of constant specified. If the named constant is not found, nil is returned. If the constant is found, but its source location can not be extracted (constant is defined in C code), empty array is returned.
inherit specifies whether to lookup in mod.ancestors (true by default).
# test.rb: class A C1 = 1 end module M C2 = 2 end class B < A include M C3 = 3 end class A # continuation of A definition end p B.const_source_location('C3') # => ["test.rb", 11] p B.const_source_location('C2') # => ["test.rb", 6] p B.const_source_location('C1') # => ["test.rb", 2] p B.const_source_location('C2', false) # => nil -- don't lookup in ancestors p Object.const_source_location('B') # => ["test.rb", 9] p Object.const_source_location('A') # => ["test.rb", 1] -- note it is first entry, not "continuation" p B.const_source_location('A') # => ["test.rb", 1] -- because Object is in ancestors p M.const_source_location('A') # => ["test.rb", 1] -- Object is not ancestor, but additionally checked for modules p Object.const_source_location('A::C1') # => ["test.rb", 2] -- nesting is supported p Object.const_source_location('String') # => [] -- constant is defined in C code
Removes the definition of the sym, returning that constant’s value.
class Dummy @@var = 99 puts @@var remove_class_variable(:@@var) p(defined? @@var) end
produces:
99 nil
Returns the value of the given class variable (or throws a NameError exception). The @@ part of the variable name should be included for regular class variables. String arguments are converted to symbols.
class Fred @@foo = 99 end Fred.class_variable_get(:@@foo) #=> 99