UNIXServer.new(path) => unixserver Class Public methods Creates a new UNIX server socket bound to path. serv = UNIXServer.new("/tmp/sock") s = serv.accept p s.read
fatal?() Instance Public methods Will the logger output FATAL messages?
Thread.pending_interrupt?(error = nil) â true/false Class Public methods Returns whether or not the asynchronous queue is empty. Since ::handle_interrupt can be used to defer asynchronous events. This method can be used to determine if there are any deferred events. If you find this method returns true, then you may finish :never blocks. For example, the following method processes deferred asynchronous events immediately. def Thread.kick_interrupt_immediately Thread.handle_inter
num.remainder(numeric) â real Instance Public methods x.remainder(y) means x-y*(x/y).truncate See Numeric#divmod.
keys(keynam, pattern=nil) Class Public methods
uidl() Instance Public methods Alias for: unique_id
errors() Instance Public methods Returns the Errors object that holds all information about attribute error messages. class Person include ActiveModel::Validations attr_accessor :name validates_presence_of :name end person = Person.new person.valid? # => false person.errors # => #<ActiveModel::Errors:0x007fe603816640 @messages={name:["can't be blank"]}>
ary.sample â objary.sample(random: rng) â objary.sample(n) â new_aryary.sample(n, random: rng) â new_ary Instance Public methods Choose a random element or n random elements from the array. The elements are chosen by using random and unique indices into the array in order to ensure that an element doesn't repeat itself unless the array already contained duplicate elements. If the array is empty the first form returns nil and the second form retu
new(top_level, file_name, content, options, stats) Class Public methods Prepare to parse a plain file
thr.backtrace_locations(*args) â array or nil Instance Public methods Returns the execution stack for the target threadâan array containing backtrace location objects. See Thread::Backtrace::Location for more information. This method behaves similarly to Kernel#caller_locations except it applies to a specific thread.
Page 2010 of 2275