Module: Spade::Namespace

Defined in:
lib/spade/exports.rb

Instance Method Summary collapse

Instance Method Details

#[](name) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/spade/exports.rb', line 10

def [](name)
  begin
    self.class.const_defined?(name) ? self.class.const_get(name) : yield
  rescue NameError => e
    yield
  end
end