Class: Object

Inherits:
BasicObject
Defined in:
lib/spix_parser/core_ext.rb

Instance Method Summary collapse

Instance Method Details

#blank?Boolean

Returns:

  • (Boolean)


57
58
59
# File 'lib/spix_parser/core_ext.rb', line 57

def blank?
  respond_to?(:empty?) ? empty? : !self
end

#silence_warningsObject



61
62
63
64
65
66
# File 'lib/spix_parser/core_ext.rb', line 61

def silence_warnings
  old_verbose, $VERBOSE = $VERBOSE, nil
  yield
ensure
  $VERBOSE = old_verbose
end