Class: Object

Inherits:
BasicObject
Defined in:
lib/ext/ext.rb,
lib/ext/ext.rb

Instance Method Summary collapse

Instance Method Details

#blank?Boolean

Returns:

  • (Boolean)


50
51
52
# File 'lib/ext/ext.rb', line 50

def blank?
  self.nil? || self == ""
end

#meta_def(name, &blk) ⇒ Object



4
5
6
7
8
# File 'lib/ext/ext.rb', line 4

def meta_def name, &blk
  (class << self; self; end).instance_eval do
    define_method(name, &blk)
  end
end