Class: Numeric

Inherits:
Object show all
Defined in:
lib/kyanite/array.rb,
lib/kyanite/numeric.rb,
lib/kyanite/string/split.rb,
lib/kyanite/general/kernel.rb

Instance Method Summary collapse

Instance Method Details

#empty?Boolean

false, Numerics are not empty.

Returns:

  • (Boolean)


12
13
14
# File 'lib/kyanite/numeric.rb', line 12

def empty? 
    false 
end

#seconds(&block) ⇒ Object

Repeats a block until the time is up. Returns the number of passes. All Exceptions are caught (=> bad blocks seem to run faster). Example (using Numeric):

3.seconds do
 puts Time.now.inspect
end

Example (using KKernel):

repeat_n_seconds 3 do
 puts Time.now.inspect
end


78
79
80
81
82
# File 'lib/kyanite/general/kernel.rb', line 78

def seconds( &block )
  repeat_n_seconds( self ) do 
        yield block if block    
  end
end

#shift_complementNilClass

nil, Complements Array#shift_complement.

Returns:



122
123
124
# File 'lib/kyanite/array.rb', line 122

def shift_complement 
  nil
end

#split_numericNumeric

self, complements String#split_numeric.

Returns:



165
166
167
# File 'lib/kyanite/string/split.rb', line 165

def split_numeric 
    self 
end