Class: IbRubyProxy::Server::IbRubyClassFilesGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/ib_ruby_proxy/server/ib_ruby_class_files_generator.rb

Overview

Source code generator that interacts with IbRubyClassSourceGenerator and writes down the actual files with the source for both Ruby classes representing IB classes and Ruby extensions for these.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client_code_dir:, server_code_dir:) ⇒ IbRubyClassFilesGenerator

Returns a new instance of IbRubyClassFilesGenerator.

Parameters:

  • client_code_dir (String)
  • server_code_dir (String)


11
12
13
14
15
16
# File 'lib/ib_ruby_proxy/server/ib_ruby_class_files_generator.rb', line 11

def initialize(client_code_dir:, server_code_dir:)
  @client_code_dir = client_code_dir
  @server_code_dir = server_code_dir

  import_ruby_classes
end

Instance Attribute Details

#client_code_dirObject (readonly)

Returns the value of attribute client_code_dir.



7
8
9
# File 'lib/ib_ruby_proxy/server/ib_ruby_class_files_generator.rb', line 7

def client_code_dir
  @client_code_dir
end

#server_code_dirObject (readonly)

Returns the value of attribute server_code_dir.



7
8
9
# File 'lib/ib_ruby_proxy/server/ib_ruby_class_files_generator.rb', line 7

def server_code_dir
  @server_code_dir
end

Instance Method Details

#generate_allObject

Generate client files and server class extensions

It will format the generated code with Rufo.



24
25
26
27
# File 'lib/ib_ruby_proxy/server/ib_ruby_class_files_generator.rb', line 24

def generate_all
  do_generate_all
  format_code
end