Sha256: 29f244b0a45b862d5df359448bcc054742756e7421134418e614fc91c5ec3d92

Contents?: true

Size: 557 Bytes

Versions: 3

Compression:

Stored size: 557 Bytes

Contents

module Euston
  class CommandHeaders
    attr_reader :id, :type, :version, :log_completion

    def initialize id, type, version, log_completion = false
      @id = id
      @type = type
      @version = version
      @log_completion = log_completion
    end

    def to_hash
      {
        :id => id,
        :type => type,
        :version => version,
        :log_completion => log_completion
      }
    end

    def self.from_hash hash
      self.new hash[:id], hash[:type].to_sym, hash[:version], ( hash[:log_completion] || false )
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
euston-1.0.1 lib/euston/command_headers.rb
euston-1.0.1-java lib/euston/command_headers.rb
euston-1.0.0 lib/euston/command_headers.rb