Module: JavaClass::Dsl::LoadDirective
- Included in:
- Mixin
- Defined in:
- lib/javaclass/dsl/loading_classpath.rb
Overview
A special directive which wraps a method with a LoadingClasspath.
- Author
-
Peter Kofler
Instance Method Summary collapse
-
#wrap_classpath(method_name) ⇒ Object
Wrap the method with method_name in a LoadingClasspath.
Instance Method Details
#wrap_classpath(method_name) ⇒ Object
Wrap the method with method_name in a LoadingClasspath.
45 46 47 48 |
# File 'lib/javaclass/dsl/loading_classpath.rb', line 45 def wrap_classpath(method_name) self.module_eval("alias :__pure_#{method_name}__ #{method_name.to_s}") self.module_eval("def #{method_name}(*obj) LoadingClasspath.new(__pure_#{method_name}__(*obj)) end") end |