Class: ProconBypassMan::Processor
- Inherits:
-
Object
- Object
- ProconBypassMan::Processor
- Defined in:
- lib/procon_bypass_man/processor.rb
Instance Method Summary collapse
-
#initialize(binary) ⇒ Processor
constructor
A new instance of Processor.
-
#process(external_input_data: nil) ⇒ String
加工後の入力データ.
Constructor Details
#initialize(binary) ⇒ Processor
Returns a new instance of Processor.
4 5 6 |
# File 'lib/procon_bypass_man/processor.rb', line 4 def initialize(binary) @binary = binary end |
Instance Method Details
#process(external_input_data: nil) ⇒ String
Returns 加工後の入力データ.
10 11 12 13 14 15 16 |
# File 'lib/procon_bypass_man/processor.rb', line 10 def process(external_input_data: nil) return @binary.raw unless @binary.user_operation_data? procon = ProconBypassMan::Procon.new(@binary.raw) procon.apply! procon.to_binary(external_input_data: external_input_data) end |