Method: U3dCore::UI.method_missing

Defined in:
lib/u3d_core/ui/ui.rb

.method_missing(method_sym, *args, &_block) ⇒ Object

rubocop:disable Style/MissingRespondToMissing



36
37
38
39
40
41
42
43
# File 'lib/u3d_core/ui/ui.rb', line 36

def self.method_missing(method_sym, *args, &_block)
  # rubocop:enable Style/MissingRespondToMissing
  # not using `responds` because we don't care about methods like .to_s and so on
  interface_methods = Interface.instance_methods - Object.instance_methods
  UI.user_error!("Unknown method '#{method_sym}', supported #{interface_methods}") unless interface_methods.include?(method_sym)

  current.send(method_sym, *args)
end