Module: Spade::Namespace

Defined in:
lib/spade/exports.rb

Instance Method Summary collapse

Instance Method Details

#[](name) ⇒ Object



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

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