Sha256: 56531bb72e0949e92d475dd0aeeed512b71a2939ca00f9e3b1e95755abf53520
Contents?: true
Size: 513 Bytes
Versions: 2
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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
head_music-0.29.0 | lib/head_music/content/bar.rb |
head_music-0.28.0 | lib/head_music/content/bar.rb |