class IbRubyProxy::Server::Reflection::IbClass
An ib class
Attributes
klass[R]
Public Class Methods
new(klass)
click to toggle source
@param [Class] klass
# File lib/ib_ruby_proxy/server/reflection/ib_class.rb, line 11 def initialize(klass) @klass = klass end
Public Instance Methods
full_name()
click to toggle source
The full qualified class name including namespace
@return [Object]
# File lib/ib_ruby_proxy/server/reflection/ib_class.rb, line 25 def full_name klass.name end
java_property_fields()
click to toggle source
List of ib fields that represent properties to interchange
@return [Array<IbField>]
# File lib/ib_ruby_proxy/server/reflection/ib_class.rb, line 32 def java_property_fields @java_property_fields ||= java_fields.collect { |field| IbField.new(field, self) } end
name()
click to toggle source
The class name without including namespaces
@return [String]
# File lib/ib_ruby_proxy/server/reflection/ib_class.rb, line 18 def name klass.name.split('::').last end
ruby_property_names()
click to toggle source
List of ruby properties names that correspond to {#java_property_fields}
@return [Array<String>]
# File lib/ib_ruby_proxy/server/reflection/ib_class.rb, line 39 def ruby_property_names @ruby_properties ||= java_property_fields.collect do |field| to_underscore(field.name) end end
zipped_ruby_and_java_properties()
click to toggle source
Return an array of combinations of {#ruby_property_names} and #{java_property_fields}
@return [Array<Array<String, IbField>>]
# File lib/ib_ruby_proxy/server/reflection/ib_class.rb, line 48 def zipped_ruby_and_java_properties ruby_property_names.zip(java_property_fields) end
Private Instance Methods
java_fields()
click to toggle source
# File lib/ib_ruby_proxy/server/reflection/ib_class.rb, line 54 def java_fields @java_property_fields ||= klass.java_class.declared_fields.find_all do |field| field.name =~ IbField::IB_FIELD_PREFIX end end