mirror of
				https://github.com/onyx-and-iris/voicemeeter-rb.git
				synced 2025-10-31 04:11:46 +00:00 
			
		
		
		
	switch send for public_send
This commit is contained in:
		
							parent
							
								
									350ebdd444
								
							
						
					
					
						commit
						42baa543fc
					
				| @ -207,9 +207,9 @@ module Voicemeeter | ||||
|       data.each do |key, hash| | ||||
|         case key.to_s.split("-") | ||||
|         in [/strip|bus|button/ => kls, /^[0-9]+$/ => index] | ||||
|           target = send(kls) | ||||
|           target = public_send(kls) | ||||
|         in ["vban", /in|instream|out|oustream/ => dir, /^[0-9]+$/ => index] | ||||
|           target = vban.send("#{dir.chomp("stream")}stream") | ||||
|           target = vban.public_send("#{dir.chomp("stream")}stream") | ||||
|         else | ||||
|           raise KeyError, "invalid config key '#{key}'" | ||||
|         end | ||||
|  | ||||
| @ -37,12 +37,12 @@ module Voicemeeter | ||||
|     def apply(params) | ||||
|       params.each do |key, val| | ||||
|         if val.is_a? Hash | ||||
|           target = send(key) | ||||
|           target = pulic_send(key) | ||||
|           target.apply(val) | ||||
|         elsif key == :mode | ||||
|           mode.send("#{val}=", true) | ||||
|           mode.pulic_send("#{val}=", true) | ||||
|         else | ||||
|           send("#{key}=", val) | ||||
|           pulic_send("#{key}=", val) | ||||
|         end | ||||
|       end | ||||
|     end | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user