Sha256: d004fa5b3e86bb9845c2509b0ebf20342363687ff1903b748c779668849f6e08

Contents?: true

Size: 347 Bytes

Versions: 6

Compression:

Stored size: 347 Bytes

Contents

# Accepts the letter name count between two notes and categorizes the interval
class HeadMusic::DiatonicInterval::Category
  attr_reader :number

  def initialize(number)
    @number = number
  end

  def step?
    number == 2
  end

  def skip?
    number == 3
  end

  def leap?
    number >= 3
  end

  def large_leap?
    number > 3
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
head_music-7.0.5 lib/head_music/diatonic_interval/category.rb
head_music-7.0.4 lib/head_music/diatonic_interval/category.rb
head_music-7.0.3 lib/head_music/diatonic_interval/category.rb
head_music-7.0.2 lib/head_music/diatonic_interval/category.rb
head_music-7.0.1 lib/head_music/diatonic_interval/category.rb
head_music-7.0.0 lib/head_music/diatonic_interval/category.rb