rename meta function

This commit is contained in:
norm 2022-10-23 06:09:18 +01:00
parent f30f46a99f
commit a8cd29ab52

View File

@ -5,7 +5,7 @@ module OBSWS
module Meta module Meta
include Util include Util
def make_response_methods(*params) def make_field_methods(*params)
params.each do |param| params.each do |param|
define_singleton_method(param.to_s.to_snake) { @resp[param] } define_singleton_method(param.to_s.to_snake) { @resp[param] }
end end
@ -18,7 +18,7 @@ module OBSWS
def initialize(resp, fields) def initialize(resp, fields)
@resp = resp @resp = resp
@fields = fields @fields = fields
self.make_response_methods *fields self.make_field_methods *fields
end end
def empty? = @fields.empty? def empty? = @fields.empty?