Class: ProconBypassMan::DeviceConnection::OutputReportGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/procon_bypass_man/device_connection/output_report_generator.rb

Instance Method Summary collapse

Constructor Details

#initializeOutputReportGenerator

Returns a new instance of OutputReportGenerator.



2
3
4
# File 'lib/procon_bypass_man/device_connection/output_report_generator.rb', line 2

def initialize
  @counter = 0
end

Instance Method Details

#generate_by_step(step) ⇒ String

Returns:

  • (String)


7
8
9
10
11
12
# File 'lib/procon_bypass_man/device_connection/output_report_generator.rb', line 7

def generate_by_step(step)
  sub_command_with_arg = ProconBypassMan::DeviceConnection::ProconSettingOverrider::ALL_SETTINGS[step]&.join or raise("Unsupport step")
  raw_data = generate(sub_command_with_arg)
  count_up
  raw_data
end

#generate_by_sub_command_with_arg(sub_command_with_arg) ⇒ String

Returns:

  • (String)


15
16
17
18
19
# File 'lib/procon_bypass_man/device_connection/output_report_generator.rb', line 15

def generate_by_sub_command_with_arg(sub_command_with_arg)
  raw_data = generate(sub_command_with_arg)
  count_up
  raw_data
end