Sha256: 500cd32f7d22f8277bde296f810c532b28963f01127d263e8ccf30704fef342b

Contents?: true

Size: 808 Bytes

Versions: 1

Compression:

Stored size: 808 Bytes

Contents

# frozen_string_literal: true

module ChemScanner
  module Interpreter
    # Reaction Step
    class ReactionStep
      attr_accessor :description, :time, :temperature, :reagents, :number

      def initialize
        @number = 0
        @description = ""
        @time = ""
        @temperature = ""

        @reagents = []
      end

      def inspect
        (
          "#<ReactionStep: description=#{@description}, " +
          "number=#{@number}, " +
          "time=#{@time}, " +
          "temperature=#{@temperature}, " +
          "reagents=#{@reagents}"
        )
      end

      def to_hash
        {
          number: @number,
          description: @description,
          time: @time,
          temperature: @temperature,
          reagents: @reagents,
        }
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
chem_scanner-0.1.3 lib/chem_scanner/interpreter/element/reaction_step.rb