Class: Stave::Theory::Accidental

Inherits:
Core::Lookup show all
Defined in:
lib/stave/theory/accidental.rb

Instance Attribute Summary

Attributes inherited from Core::Lookup

#variant

Instance Method Summary collapse

Methods inherited from Core::Lookup

#==, each_key, find_by, #initialize, keys, string_keys, variant, variant?, variant_lookup, variants, where, with_options

Constructor Details

This class inherits a constructor from Stave::Core::Lookup

Instance Method Details

#flat?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/stave/theory/accidental.rb', line 10

def flat?
  transform.negative?
end

#natural?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/stave/theory/accidental.rb', line 14

def natural?
  transform.zero?
end

#sharp?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/stave/theory/accidental.rb', line 18

def sharp?
  transform.positive?
end