Class: OutputReportGenerator
- Inherits:
-
Object
- Object
- OutputReportGenerator
- Defined in:
- lib/procon_bypass_man/support/output_report_generator.rb
Constant Summary collapse
- NO_ACTION =
["30f28100800078c77448287509550274ff131029001b0022005a0271ff191028001e00210064027cff1410280020002100000000000000000000000000000000"].pack("H*").freeze
Instance Method Summary collapse
- #execute ⇒ String
-
#initialize(*pressed_buttons) ⇒ OutputReportGenerator
constructor
A new instance of OutputReportGenerator.
Constructor Details
#initialize(*pressed_buttons) ⇒ OutputReportGenerator
Returns a new instance of OutputReportGenerator.
5 6 7 |
# File 'lib/procon_bypass_man/support/output_report_generator.rb', line 5 def initialize(*) @buttons = || [] end |
Instance Method Details
#execute ⇒ String
10 11 12 13 14 15 16 17 |
# File 'lib/procon_bypass_man/support/output_report_generator.rb', line 10 def execute user_operation = ProconBypassMan::Procon::UserOperation.new(NO_ACTION.dup) [@buttons].flatten.sort.uniq.each do || user_operation.(.to_sym) end user_operation.binary.unpack.first end |