Results for: "minmax"

No documentation available
No documentation available
No documentation available

Returns true if the given instance variable is defined in obj. 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_defined?(:@a)    #=> true
fred.instance_variable_defined?("@b")   #=> true
fred.instance_variable_defined?("@c")   #=> false

Defines a singleton method in the receiver. The method parameter can be a Proc, a Method or an UnboundMethod object. If a block is specified, it is used as the method body. If a block or a method has parameters, they’re used as method parameters.

class A
  class << self
    def class_name
      to_s
    end
  end
end
A.define_singleton_method(:who_am_i) do
  "I am: #{class_name}"
end
A.who_am_i   # ==> "I am: A"

guy = "Bob"
guy.define_singleton_method(:hello) { "#{self}: Hello there!" }
guy.hello    #=>  "Bob: Hello there!"

chris = "Chris"
chris.define_singleton_method(:greet) {|greeting| "#{greeting}, I'm Chris!" }
chris.greet("Hi") #=> "Hi, I'm Chris!"

DO NOT USE THIS DIRECTLY.

Hook method to return whether the obj can respond to id method or not.

When the method name parameter is given as a string, the string is converted to a symbol.

See respond_to?, and the example of BasicObject.

Invoked as a callback whenever a singleton method is undefined in the receiver.

module Chatty
  def Chatty.singleton_method_undefined(id)
    puts "Undefining #{id.id2name}"
  end
  def Chatty.one()   end
  class << self
     undef_method(:one)
  end
end

produces:

Undefining one

Returns the limit for field size; used for parsing; see {Option max_field_size}:

CSV.new('').max_field_size # => nil

Since 3.2.3.

Checks for a method provided by this the delegate object by forwarding the call through _getobj_.

Specifies Emacs editing mode. The default is this mode. See the manual of GNU Readline for details of Emacs editing mode.

Raises NotImplementedError if the using readline library does not support.

Returns true if emacs mode is active. Returns false if not.

Raises NotImplementedError if the using readline library does not support.

Called when a map starts.

anchor is the anchor associated with the map or nil. tag is the tag associated with the map or nil. implicit is a boolean indicating whether or not the map was implicitly started. style is an integer indicating the mapping style.

See the constants in Psych::Nodes::Mapping for the possible values of style.

Example

Here is a YAML document that exercises most of the possible ways this method can be called:

---
k: !!map { hello: world }
v: &pewpew
  hello: world

The above YAML document consists of three maps, an outer map that contains two inner maps. Below is a matrix of the parameters sent in order to represent these three maps:

# anchor    tag                       implicit  style
[nil,       nil,                      true,     1     ]
[nil,       "tag:yaml.org,2002:map",  false,    2     ]
["pewpew",  nil,                      true,     1     ]

Called when a map ends

Start emitting a YAML map with anchor, tag, an implicit start and end, and style.

See Psych::Handler#start_mapping

Emit the end of a mapping.

See Psych::Handler#end_mapping

Returns the minor part of File_Stat#dev or nil.

File.stat("/dev/fd1").dev_minor   #=> 1
File.stat("/dev/tty").dev_minor   #=> 0

Returns the minor part of File_Stat#rdev or nil.

File.stat("/dev/fd1").rdev_minor   #=> 1
File.stat("/dev/tty").rdev_minor   #=> 0
No documentation available
No documentation available

The main loop performed by a DRbServer’s internal thread.

Accepts a connection from a client, and starts up its own thread to handle it. This thread loops, receiving requests from the client, invoking them on a local object, and returning responses, until the client closes the connection or a local method call fails.

No documentation available

Maximum number of times to retry an idempotent request in case of Net::ReadTimeout, IOError, EOFError, Errno::ECONNRESET, Errno::ECONNABORTED, Errno::EPIPE, OpenSSL::SSL::SSLError, Timeout::Error. Should be a non-negative integer number. Zero means no retries. The default value is 1.

No documentation available
No documentation available
No documentation available
Search took: 6ms  ·  Total Results: 1759