Class: IbRubyProxy::Server::Reflection::IbClass
- Inherits:
-
Object
- Object
- IbRubyProxy::Server::Reflection::IbClass
- Includes:
- Util::StringUtils
- Defined in:
- lib/ib_ruby_proxy/server/reflection/ib_class.rb
Overview
An ib class
Instance Attribute Summary collapse
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
Instance Method Summary collapse
-
#full_name ⇒ Object
The full qualified class name including namespace.
-
#initialize(klass) ⇒ IbClass
constructor
A new instance of IbClass.
-
#java_property_fields ⇒ Array<IbField>
List of ib fields that represent properties to interchange.
-
#name ⇒ String
The class name without including namespaces.
-
#ruby_property_names ⇒ Array<String>
List of ruby properties names that correspond to #java_property_fields.
-
#zipped_ruby_and_java_properties ⇒ Array<Array<String, IbField>>
Return an array of combinations of #ruby_property_names and ##java_property_fields.
Methods included from Util::StringUtils
#to_camel_case, #to_underscore
Constructor Details
#initialize(klass) ⇒ IbClass
Returns a new instance of IbClass.
11 12 13 |
# File 'lib/ib_ruby_proxy/server/reflection/ib_class.rb', line 11 def initialize(klass) @klass = klass end |
Instance Attribute Details
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
8 9 10 |
# File 'lib/ib_ruby_proxy/server/reflection/ib_class.rb', line 8 def klass @klass end |
Instance Method Details
#full_name ⇒ Object
The full qualified class name including namespace
25 26 27 |
# File 'lib/ib_ruby_proxy/server/reflection/ib_class.rb', line 25 def full_name klass.name end |
#java_property_fields ⇒ Array<IbField>
List of ib fields that represent properties to interchange
32 33 34 |
# 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 ⇒ String
The class name without including namespaces
18 19 20 |
# File 'lib/ib_ruby_proxy/server/reflection/ib_class.rb', line 18 def name klass.name.split('::').last end |
#ruby_property_names ⇒ Array<String>
List of ruby properties names that correspond to #java_property_fields
39 40 41 42 43 |
# 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 ⇒ Array<Array<String, IbField>>
Return an array of combinations of #ruby_property_names and ##java_property_fields
48 49 50 |
# 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 |