Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/fumoffu/java_mapping.rb
Overview
Object and Classes are overidden to make it easier for to exchange data between the Java accessor and Ruby accessor
Class Method Summary collapse
Class Method Details
.attr_java(*args) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/fumoffu/java_mapping.rb', line 11 def self.attr_java(*args) args.each do |arg| str_arg = arg.to_s define_method str_arg do send "get"+str_arg.split("_").collect(){|n| n.capitalize}.to_s end define_method str_arg.to_s+"=" do |val| send "set"+str_arg.split("_").collect(){|n| n.capitalize}.to_s, val end end end |