Sha256: 99d8d322f8fa2bfd28ec147a1e4dc211ddf08657a344d7bf4af8d9b4f6636d2c
Contents?: true
Size: 630 Bytes
Versions: 10
Compression:
Stored size: 630 Bytes
Contents
class HeadMusic::Instrument include HeadMusic::NamedRudiment INSTRUMENTS = { violin: { name: "violin", family: :string, default_clef: :treble }, piano: { name: "piano", family: :string, default_system: [:treble, :bass] } } def self.get(name) get_by_name(name) end def initialize(name) @name = name.to_s end def data @data ||= INSTRUMENTS[hash_key] end def family data[:family] end def default_system data[:default_system] end def default_clef data[:default_clef] end def ==(other) to_s == other.to_s end end
Version data entries
10 entries across 10 versions & 1 rubygems