Results for: "minmax"

Normalizes a request path. Raises an exception if the path cannot be normalized.

Normalizes a request path. Raises an exception if the path cannot be normalized.

Returns the mime type of filename from the list in mime_tab. If no mime type was found application/octet-stream is returned.

Returns the mime type of filename from the list in mime_tab. If no mime type was found application/octet-stream is returned.

Generates a random string of length len

Generates a random string of length len

Returns true if the element contains inline content that has a text media type.

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.

No documentation available
No documentation available
No documentation available

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.

No documentation available

Is this tar entry a symlink?

Rewinds to the beginning of the tar file entry

@return [String] a string suitable for debugging

No documentation available

Returns the value of the given instance variable, or nil if the instance variable is not set. The @ part of the variable name should be included for regular instance variables. Throws a NameError exception if the supplied symbol is not valid as an instance variable name. String arguments are converted to symbols.

class Fred
  def initialize(p1, p2)
    @a, @b = p1, p2
  end
end
fred = Fred.new('cat', 99)
fred.instance_variable_get(:@a)    #=> "cat"
fred.instance_variable_get("@b")   #=> 99

Sets the instance variable named by symbol to the given object, thereby frustrating the efforts of the class’s author to attempt to provide proper encapsulation. The variable does not have to exist prior to this call. If the instance variable name is passed as a string, that string is converted to a symbol.

class Fred
  def initialize(p1, p2)
    @a, @b = p1, p2
  end
end
fred = Fred.new('cat', 99)
fred.instance_variable_set(:@a, 'dog')   #=> "dog"
fred.instance_variable_set(:@c, 'cat')   #=> "cat"
fred.inspect                             #=> "#<Fred:0x401b3da8 @a=\"dog\", @b=99, @c=\"cat\">"

Removes the named instance variable from obj, returning that variable’s value.

class Dummy
  attr_reader :var
  def initialize
    @var = 99
  end
  def remove
    remove_instance_variable(:@var)
  end
end
d = Dummy.new
d.var      #=> 99
d.remove   #=> 99
d.var      #=> nil

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 a list of the public instance methods defined in mod. If the optional parameter is false, the methods of any ancestors are not included.

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

Search took: 4ms  ·  Total Results: 1903