Sha256: 9c267510833f16ab6bb381cd2fcbae2891670c72df2908c148f132df782aea33
Contents?: true
Size: 518 Bytes
Versions: 13
Compression:
Stored size: 518 Bytes
Contents
module MS class Spectrum # this module can be used to extend the behavior of some peaks as desired module Centroidish def mz() first end def intensity() last end end # an Array implementation of Centroidish using alias_method. Accessing # :mz and :intensity using this object will be nearly 2X as fast as # extending the Centroidish behavior (confirmed by testing) class Centroid < Array alias_method :mz, :first alias_method :intensity, :last end end end
Version data entries
13 entries across 13 versions & 1 rubygems