Module: Java::Package

Defined in:
lib/buildr/java/rjb.rb

Overview

:nodoc:

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(sym, *args, &block) ⇒ Object

Raises:

  • (ArgumentError)


66
67
68
69
70
71
# File 'lib/buildr/java/rjb.rb', line 66

def method_missing(sym, *args, &block)
  raise ArgumentError, 'No arguments expected' unless args.empty?
  name = "#{@name}.#{sym}"
  return ::Rjb.import(name) if sym.to_s =~ /^[[:upper:]]/
  ::Java.send :__package__, name
end