lib/beats/beats_runner.rb
# If the -p option is used, transform the song into one whose flow consists of
# playing that single pattern once.
If the -p option is used, transform the song into one whose flow consists of
playing that single pattern once.
If the - p option is used transform the song into one whose flow consists of playing that single pattern once .
def normalize_for_pattern_option(song)
      unless @options[:pattern].nil?
        pattern_name = @options[:pattern].downcase.to_sym
        unless song.patterns.has_key?(pattern_name)
          raise StandardError, "The song does not include a pattern called #{pattern_name}"
        end
        song.flow = [pattern_name]
        song.remove_unused_patterns
      end
      song
    end
def normalize_for_pattern_option ( song ) unless @options [ :pattern ] . nil? pattern_name = @options [ :pattern ] . downcase . to_sym unless song . patterns . has_key? ( pattern_name ) raise StandardError , "The song does not include a pattern called #{pattern_name}" end song . flow = [ pattern_name ] song . remove_unused_patterns end song end
If the -p option is used, transform the song into one whose flow consists of
playing that single pattern once.
If the - p option is used transform the song into one whose flow consists of playing that single pattern once .
song