# Ruby style for Java class data members

**URL:** <https://www.ruby-forum.com/t/ruby-style-for-java-class-data-members/161098>\
**Category:** JRuby\
**Created:** [February 23, 2009, 11:45am UTC](https://www.ruby-forum.com/t/ruby-style-for-java-class-data-members/161098 "2009-02-23T11:45:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chauk-mean](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/d07c76/32.png) [@chauk-mean](https://www.ruby-forum.com/u/chauk-mean)\
**Post date:** [February 23, 2009, 11:45am UTC](https://www.ruby-forum.com/t/ruby-style-for-java-class-data-members/161098/1 "2009-02-23T11:45:28Z")

</div>

Hi,

I’m starting to use JRuby for writing SWT GUI applications.

Currently, JRuby translates methods following the ‘beans-convention’:  
x.getSomething() # becomes x.something  
x.setSomething(newValue) # becomes x.something = new\_value  
x.isSomething() # becomes x.something?

This is really great.

Unfortunately, there is no such translation for public data members and  
SWT classes make use of such public data members :

layout = GridLayout.new  
layout.verticalSpacing = 10

# layout.vertical\_spacing is not accepted by JRuby

Is there some plan to support Ruby style for Java class data members ?

Thanks in advance.

Chauk-Mean.
