diff --git a/examples/obs/Gemfile b/examples/obs/Gemfile index 8779099..4c31b12 100644 --- a/examples/obs/Gemfile +++ b/examples/obs/Gemfile @@ -2,4 +2,4 @@ source "https://rubygems.org" -gem "obsws", "~> 0.1.3" +gem "obsws", "~> 0.3.0" diff --git a/examples/obs/main.rb b/examples/obs/main.rb index 6b7cc74..29acbd1 100644 --- a/examples/obs/main.rb +++ b/examples/obs/main.rb @@ -44,7 +44,9 @@ class Main def on_current_program_scene_changed(data) scene = data.scene_name puts "Switched to scene #{scene}" - send("on_#{scene.downcase}") + if respond_to?("on_#{scene.downcase}") + send("on_#{scene.downcase}") + end end def on_exit_started