Class: Ribs::RubyRootClass

Inherits:
Object
  • Object
show all
Defined in:
lib/ribs/definition.rb

Overview

A simple helper class that allows the Java parts of the system to get the Ruby class from the PersistentClass instance.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ RubyRootClass

Initialize data for this RootClass



95
96
97
98
# File 'lib/ribs/definition.rb', line 95

def initialize(*args)
  super
  @data = {}
end

Instance Attribute Details

#ruby_classObject

The Ruby class



92
93
94
# File 'lib/ribs/definition.rb', line 92

def ruby_class
  @ruby_class
end

Instance Method Details

#[]=(key, value) ⇒ Object

Sets a specific data element



101
102
103
# File 'lib/ribs/definition.rb', line 101

def []=(key, value)
  @data[key] = value
end

#getRubyClassObject

Get the Ruby class. Implementation of the WithRubyClass interface.



107
108
109
# File 'lib/ribs/definition.rb', line 107

def getRubyClass
  @ruby_class
end

#getRubyData(key) ⇒ Object

Gets a specific data element



112
113
114
# File 'lib/ribs/definition.rb', line 112

def getRubyData(key)
  @data[key]
end