Sha256: fbdee60c6c4d85efd255fe35c4d7003de1f46fab2289399c2d721063a98ee939
Contents?: true
Size: 1.01 KB
Versions: 18
Compression:
Stored size: 1.01 KB
Contents
# frozen_string_literal: true module PgEventstore module Extensions module BaseCommandExtension def self.included(klass) super klass.extend(ClassMethods) # Detects whether command is a known command. Known commands are commands, inherited from Base class. # @return [Boolean] klass.define_singleton_method(:known_command?) do self < klass end end module ClassMethods # @param data [Hash] # @return [Hash] def parse_data(data) {} end end # @return [Integer] def hash options_hash.hash end # @param another [Object] # @return [Boolean] def eql?(another) return false unless another.is_a?(self.class) hash == another.hash end # @param another [Object] # @return [Boolean] def ==(another) return false unless another.is_a?(self.class) options_hash == another.options_hash end end end end
Version data entries
18 entries across 18 versions & 1 rubygems