Class: ProconBypassMan::DeviceConnection::OutputReportSubCommandTable::HIDSubCommandResponse
- Inherits:
-
Object
- Object
- ProconBypassMan::DeviceConnection::OutputReportSubCommandTable::HIDSubCommandResponse
- Defined in:
- lib/procon_bypass_man/device_connection/output_report_sub_command_table.rb
Instance Attribute Summary collapse
-
#sub_command ⇒ Object
Returns the value of attribute sub_command.
-
#sub_command_arg ⇒ Object
Returns the value of attribute sub_command_arg.
Instance Method Summary collapse
-
#initialize(sub_command:, sub_command_arg:) ⇒ HIDSubCommandResponse
constructor
A new instance of HIDSubCommandResponse.
- #sub_command_with_arg ⇒ Object
Constructor Details
#initialize(sub_command:, sub_command_arg:) ⇒ HIDSubCommandResponse
Returns a new instance of HIDSubCommandResponse.
5 6 7 8 |
# File 'lib/procon_bypass_man/device_connection/output_report_sub_command_table.rb', line 5 def initialize(sub_command: , sub_command_arg: ) @sub_command = sub_command @sub_command_arg = sub_command_arg end |
Instance Attribute Details
#sub_command ⇒ Object
Returns the value of attribute sub_command.
3 4 5 |
# File 'lib/procon_bypass_man/device_connection/output_report_sub_command_table.rb', line 3 def sub_command @sub_command end |
#sub_command_arg ⇒ Object
Returns the value of attribute sub_command_arg.
3 4 5 |
# File 'lib/procon_bypass_man/device_connection/output_report_sub_command_table.rb', line 3 def sub_command_arg @sub_command_arg end |
Instance Method Details
#sub_command_with_arg ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/procon_bypass_man/device_connection/output_report_sub_command_table.rb', line 10 def sub_command_with_arg case @sub_command when *SPECIAL_SUB_COMMANDS @sub_command else if @sub_command_arg "#{@sub_command}-#{@sub_command_arg}" else @sub_command end end end |