Module: Spade::Runtime::Namespace

Included in:
Namespace
Defined in:
lib/spade/runtime/exports.rb

Instance Method Summary collapse

Instance Method Details

#[](name) ⇒ Object



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

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