Skip to content

Commit

Permalink
one of many
Browse files Browse the repository at this point in the history
Signed-off-by: Hermann Mayer <[email protected]>
  • Loading branch information
Jack12816 committed Jan 3, 2025
1 parent e1e93df commit b9d05ef
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/jabber_admin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,15 @@ def self.configure
# it is present)
#
# @param method [Symbol, String, #to_s] the name of the command to run
# @param args all additional payload to pass down to the API call
# @param args [Array<Mixed>] all additional API call payload
# @param kwargs [Hash{Symbol => Mixed}] all additional API call payload
# @return [RestClient::Response] the actual response of the command
def self.method_missing(method, *args)
predefined_command(method).call(predefined_callable(method), *args)
def self.method_missing(method, *args, **kwargs)
predefined_command(method).call(
predefined_callable(method), *args, **kwargs
)
rescue NameError
predefined_callable(method).call(method.to_s.chomp('!'), *args)
predefined_callable(method).call(method.to_s.chomp('!'), *args, **kwargs)
end

# Try to find the given name as a predefined command. When there is no such
Expand Down

0 comments on commit b9d05ef

Please sign in to comment.