Sha256: 95f7d487819cc75a4b305aad656efb47236786afa8f43376a6232ae1bb996bf1

Contents?: true

Size: 234 Bytes

Versions: 16

Compression:

Stored size: 234 Bytes

Contents

module TStructComparable
  def ==(other)
    return false unless other.is_a?(self.class)

    self.class.props.keys.all? do |prop|
      self.send(prop) == other.send(prop)
    end
  end

  def eql?(other)
    self == other
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
sorbet-rails-0.7.34 spec/tstruct_comparable.rb
sorbet-rails-0.7.33 spec/tstruct_comparable.rb
sorbet-rails-0.7.32 spec/tstruct_comparable.rb
sorbet-rails-0.7.31 spec/tstruct_comparable.rb
sorbet-rails-0.7.27 spec/tstruct_comparable.rb
sorbet-rails-0.7.26 spec/tstruct_comparable.rb
sorbet-rails-0.7.25 spec/tstruct_comparable.rb
sorbet-rails-0.7.24 spec/tstruct_comparable.rb
sorbet-rails-0.7.23 spec/tstruct_comparable.rb
sorbet-rails-0.7.22 spec/tstruct_comparable.rb
sorbet-rails-0.7.20 spec/tstruct_comparable.rb
sorbet-rails-0.7.19 spec/tstruct_comparable.rb
sorbet-rails-0.7.18 spec/tstruct_comparable.rb
sorbet-rails-0.7.5 spec/tstruct_comparable.rb
sorbet-rails-0.7.4 spec/tstruct_comparable.rb
sorbet-rails-0.7.3 spec/tstruct_comparable.rb