about summary refs log tree commit homepage
path: root/lib/dtas/format.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dtas/format.rb')
-rw-r--r--lib/dtas/format.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/dtas/format.rb b/lib/dtas/format.rb
index e9da16f..223d9c0 100644
--- a/lib/dtas/format.rb
+++ b/lib/dtas/format.rb
@@ -81,6 +81,14 @@ class DTAS::Format # :nodoc:
     ivars_to_hash(SIVS)
   end
 
+  def ==(other)
+    a = to_hash
+    b = other.to_hash
+    a["bits"] ||= bits_per_sample
+    b["bits"] ||= other.bits_per_sample
+    a == b
+  end
+
   # for the _decoded_ output
   def bits_per_sample
     return @bits if @bits