Sha256: f37f9018309d42df6827e448a5e136edb17a63cff602e864e7ce9ba1ed1e1401
Contents?: true
Size: 513 Bytes
Versions: 23
Compression:
Stored size: 513 Bytes
Contents
# frozen_string_literal: true # Representation of a bar in a composition # Encapsulates meter and key signature changes class HeadMusic::Bar attr_reader :composition attr_accessor :key_signature, :meter def initialize(composition, key_signature: nil, meter: nil) @composition = composition @key_signature = HeadMusic::KeySignature.get(key_signature) if key_signature @meter = HeadMusic::Meter.get(meter) if meter end def to_s ['Bar', key_signature, meter].compact.join(' ') end end
Version data entries
23 entries across 23 versions & 1 rubygems