Sha256: 2cfb7688899462038dabf5fd3db9e09a3bde2533a83a0352cb8de78f06fb8012

Contents?: true

Size: 634 Bytes

Versions: 1

Compression:

Stored size: 634 Bytes

Contents

# Copyright 2024 Kyrylo Shyshko
# Licensed under the Apache License, Version 2.0. See LICENSE file for details.

module Kompiler

	# Object for managing architecture entries / available architectures
	module ArchManager
		@arch_entries = []
		
		def self.add_arch(arch_name, include_path)
			@arch_entries << {name: arch_name, include_path: include_path}
		end
		
		def self.get_arch(arch_name)
			@arch_entries.filter{|entry| entry[:name] == arch_name}[0]
		end
		
		def self.entries
			@arch_entries
		end
		
		def self.load_all_entries
			Dir[File.join(__dir__, 'arch_entries', '*.rb')].each { |file| require file }
		end
	end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kompiler-0.3.0.pre.3 lib/kompiler/arch_manager.rb