Closest Ruby representation of a 'private static final' and 'public static final' class variable in

Posted by Hosh on Stack Overflow See other posts from Stack Overflow or by Hosh
Published on 2010-03-14T07:44:00Z Indexed on 2010/03/14 8:35 UTC
Read the original article Hit count: 658

Filed under:
|
|
|
|

Given the Java code below, what's the closest you could represent these two static final variables in a Ruby class? And, is it possible in Ruby to distinguish between private static and public static variables as there is in Java?

public class DeviceController
{
  ...
  private static final Device myPrivateDevice = Device.getDevice("mydevice");
  public static final Device myPublicDevice = Device.getDevice("mydevice");
  ...
  public static void main(String args[])
  {
   ...
  }
}

© Stack Overflow or respective owner

Related posts about ruby

Related posts about java