Module: Mspire::Mass::Merged
- Extended by:
- MassProvider
- Defined in:
- lib/mspire/mass/merged.rb
Overview
provides hashes with both Amino Acids (uppercase letters) and elements (lowercased) along with common abbreviations
Constant Summary collapse
- MONO_STRING =
downcase_keys( Element::MONO_STRING ) .merge( downcase_keys( Common::MONO_STRING ) ) .merge( AA::MONO_STRING ) .merge( downcase_keys( Subatomic::MONO_STRING ) )
- AVG_STRING =
downcase_keys( Element::AVG_STRING ) .merge( downcase_keys( Common::AVG_STRING ) ) .merge( AA::AVG_STRING ) .merge( downcase_keys( Subatomic::AVG_STRING ) )
Constants included from MassProvider
Mspire::Mass::MassProvider::DEFAULTS
Class Method Summary collapse
Methods included from MassProvider
Class Method Details
.downcase_keys(hash) ⇒ Object
16 17 18 |
# File 'lib/mspire/mass/merged.rb', line 16 def downcase_keys(hash) Hash[ hash.map {|key,val| [key.to_s.downcase, val] } ] end |
.masses(opts = {}) ⇒ Object
20 21 22 23 |
# File 'lib/mspire/mass/merged.rb', line 20 def masses(opts={}) # force upper case (which merely respects the case given) super(opts.merge(case: :up)) end |