Class: Rubycam::CLI::Commands::Set
- Inherits:
-
VideoCommand
- Object
- Dry::CLI::Command
- VideoCommand
- Rubycam::CLI::Commands::Set
- Defined in:
- lib/rubycam/cli.rb
Instance Method Summary collapse
Instance Method Details
#call(control:, value:, **options) ⇒ Object
117 118 119 120 121 122 123 124 125 |
# File 'lib/rubycam/cli.rb', line 117 def call(control:, value:, **) with_device() do |dev| ctrl = fetch_control(dev, control) ctrl.value = Integer(value) puts "#{ctrl.key} = #{ctrl.value}" end rescue ArgumentError abort "rubycam: value must be an integer, got #{value.inspect}" end |