Sha256: 987007a257c7b1f3915793c19aaf4fe9dc52c57333e1aa271d2fff3357dcf6c3

Contents?: true

Size: 642 Bytes

Versions: 6

Compression:

Stored size: 642 Bytes

Contents

class Module
  # TODO improve this (make it work dynamically per DSL loaded)
  begin
    instance_method(:const_missing_without_glimmer)
  rescue
    alias const_missing_without_glimmer const_missing

    def const_missing(constant)
      return const_missing_without_glimmer(constant) if @const_missing_without_glimmer_constant
      @const_missing_without_glimmer_constant = constant
      ::Glimmer::SWT.const_get(constant)
    rescue LoadError => e
      const_missing_without_glimmer(constant)
    rescue => e
      const_missing_without_glimmer(constant)
    ensure
      @const_missing_without_glimmer_constant = nil
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
glimmer-0.4.9 lib/glimmer/ext/module.rb
glimmer-0.4.8 lib/glimmer/ext/module.rb
glimmer-0.4.7 lib/glimmer/ext/module.rb
glimmer-0.4.6 lib/glimmer/ext/module.rb
glimmer-0.4.5 lib/glimmer/ext/module.rb
glimmer-0.4.4 lib/glimmer/ext/module.rb