Top Level Namespace

Defined Under Namespace

Modules: NNG

Instance Method Summary collapse

Instance Method Details

#save_config(config) ⇒ Object

This extconf.rb is used to capture gem install options It doesn’t compile anything, just saves configuration



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'ext/nng/extconf.rb', line 8

def save_config(config)
  config_file = File.join(__dir__, 'nng_config.rb')
  File.write(config_file, <<~RUBY)
    # frozen_string_literal: true
    # Auto-generated by extconf.rb during gem installation
    # DO NOT EDIT THIS FILE MANUALLY

    module NNG
      module InstallConfig
        CONFIG = #{config.inspect}
      end
    end
  RUBY
  puts "NNG configuration saved to #{config_file}"
end