Class: Object

Inherits:
BasicObject
Defined in:
lib/algebra/import-module.rb

Overview

Instance Method Summary collapse

Instance Method Details

#adopt(mod) ⇒ Object



409
410
411
412
# File 'lib/algebra/import-module.rb', line 409

def adopt(mod)
  (class << self; self; end).adopt_module(mod)
  self
end

#import(mod) ⇒ Object



403
404
405
406
407
# File 'lib/algebra/import-module.rb', line 403

def import(mod)
  (class << self; self; end).import_module(mod) do
    yield self
  end
end