3 # Ruby program to generate config.rb
5 default_architecture
= ENV['DEFAULT_ARCHITECTURE']
6 default_format
= ENV['DEFAULT_FORMAT']
7 gas_command
= ENV['GAS'] || 'as'
8 nasm_command
= ENV['NASM'] || ENV['YASM'] || 'nasm'
12 # Methods to get and set configuration parameters
14 # Class that holds configuration parameters
17 @default_architecture = #{default_architecture.to_sym.inspect}
18 @default_format = #{default_format.to_sym.inspect}
19 @gas_command = #{gas_command.inspect}
20 @nasm_command = #{nasm_command.inspect}
23 attr_accessor :default_architecture,
29 DEFAULT_CONFIGURATION = Configuration.new
35 [:default_architecture,
42 DEFAULT_CONFIGURATION.#{symbol}
46 DEFAULT_CONFIGURATION.#{symbol} = value