Sha256: 06dcb4577e77b63d9d483b30c865deeb78f2aea035bf8f771c9c5bf573bc26fa

Contents?: true

Size: 335 Bytes

Versions: 10

Compression:

Stored size: 335 Bytes

Contents

class Ecu
  class Signal
    def self.from_lab(line)
      name, tasks, comment = line.strip.split(";")
      maintask             = tasks.split("&").first rescue nil
      new(name: name,
          task: maintask,
          description: comment&.strip)
    end

    def to_lab
      "#{name};#{task};#{description}"
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
automotive-ecu-0.1.9 lib/ecu/interfaces/lab/signal.rb
automotive-ecu-0.1.8 lib/ecu/interfaces/lab/signal.rb
automotive-ecu-0.1.7 lib/ecu/interfaces/lab/signal.rb
automotive-ecu-0.1.6 lib/ecu/interfaces/lab/signal.rb
automotive-ecu-0.1.5 lib/ecu/interfaces/lab/signal.rb
automotive-ecu-0.1.4 lib/ecu/interfaces/lab/signal.rb
automotive-ecu-0.1.3 lib/ecu/interfaces/lab/signal.rb
automotive-ecu-0.1.2 lib/ecu/interfaces/lab/signal.rb
automotive-ecu-0.1.1 lib/ecu/interfaces/lab/signal.rb
automotive-ecu-0.1.0 lib/ecu/interfaces/lab/signal.rb