Sha256: d544565f95459f3251ae9e12beb1b1873073f139b2a91c5719743d6a8139ebce
Contents?: true
Size: 585 Bytes
Versions: 7
Compression:
Stored size: 585 Bytes
Contents
# frozen_string_literal: true # A module for musical content module HeadMusic::Content; end # Representation of a bar in a composition # Encapsulates meter and key signature changes class HeadMusic::Content::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
7 entries across 7 versions & 1 rubygems