Skip to content

Instantly share code, notes, and snippets.

@kml
Created October 25, 2013 15:07
Show Gist options
  • Save kml/7156168 to your computer and use it in GitHub Desktop.
Save kml/7156168 to your computer and use it in GitHub Desktop.
# encoding: utf-8
class StringUtilsMock
def self.underscore(name); name.underscore; end
end
JavaUtilities.class_eval do
class << self
alias_method :get_proxy_or_package_under_package_original, :get_proxy_or_package_under_package
def get_proxy_or_package_under_package(obj, sym)
sym == :StringUtils ? StringUtilsMock : get_proxy_or_package_under_package_original(obj, sym)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment