Last active

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Output of pry session in JRuby showing Rubified method names such as default=.

View gist:6912655
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
[1] pry(main)> require 'java'
=> false
 
[2] pry(main)> cd java.util.Locale
 
[3] pry(Java::JavaUtil::Locale):1> ls
constants:
CANADA ENGLISH GERMANY JAPANESE ROOT UK
CANADA_FRENCH FRANCE ITALIAN KOREA SIMPLIFIED_CHINESE US
CHINA FRENCH ITALY KOREAN TAIWAN
CHINESE GERMAN JAPAN PRC TRADITIONAL_CHINESE
JavaProxy.methods:
[] __persistent__= field_reader java_class new_array
__persistent__ field_accessor field_writer java_class= singleton_class
ConcreteJavaProxy.methods: new
Java::JavaUtil::Locale.methods:
available_locales default= iso_countries java_method
default get_instance iso_languages java_send
Java::JavaUtil::Locale#methods:
== clone display_language equals language
__jcreate! country display_name iso3_country variant
__jsend! display_country display_variant iso3_language
instance variables: @java_class
locals: _ __ _dir_ _ex_ _file_ _in_ _out_ _pry_
 
[5] pry(Java::JavaUtil::Locale):1> java.util.Locale.default
=> #<Java::JavaUtil::Locale:0x1f619137>
 
[6] pry(Java::JavaUtil::Locale):1> java.util.Locale.getDefault
=> #<Java::JavaUtil::Locale:0x1f619137>
 
[8] pry(Java::JavaUtil::Locale):1> java.util.Locale.default = java.util.Locale::FRANCE
=> #<Java::JavaUtil::Locale:0x669b824>
 
[9] pry(Java::JavaUtil::Locale):1> java.util.Locale.default = java.util.Locale::GERMANY
=> #<Java::JavaUtil::Locale:0x3a6bf80b>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.