Sha256: 9030510ae28f9be1839788972f3c3a33c88a240d9e4bf04cbe9119f385be1308
Contents?: true
Size: 822 Bytes
Versions: 9
Compression:
Stored size: 822 Bytes
Contents
# frozen_string_literal: true module Coltrane module Cli # Interfaces chord functionality with the lib class Chord def initialize(*chords, on: :text, flavor: 'intervals', notes: nil) @chords = if !chords.empty? if chords[0].is_a?(String) chords.map { |c| Coltrane::Chord.new(name: c) } else chords end elsif !notes.nil? [Coltrane::Chord.new(notes: notes)] end @chords.each do |chord| desc = "#{chord.name} chord:" Coltrane::Cli::Notes.new chord.notes, on: on, desc: desc, flavor: flavor end end end end end # rubocop:enable Metrics/MethodLength
Version data entries
9 entries across 9 versions & 1 rubygems