Class: SpotifyWebApi::ModeEnum
- Inherits:
-
Object
- Object
- SpotifyWebApi::ModeEnum
- Defined in:
- lib/spotify_web_api/models/mode_enum.rb
Overview
Indicates the modality (major or minor) of a section, the type of scale from which its melodic content is derived. This field will contain a 0 for “minor”, a 1 for “major”, or a -1 for no result. Note that the major key (e.g. C major) could more likely be confused with the minor key at 3 semitones lower (e.g. A minor) as both keys carry the same pitches.
Constant Summary collapse
- MODE_ENUM =
[ # TODO: Write general description for ENUM_MINUS1 ENUM_MINUS1 = -1, # TODO: Write general description for ENUM_0 ENUM_0 = 0, # TODO: Write general description for ENUM_1 ENUM_1 = 1 ].freeze
Class Method Summary collapse
Class Method Details
.validate(value) ⇒ Object
24 25 26 27 28 |
# File 'lib/spotify_web_api/models/mode_enum.rb', line 24 def self.validate(value) return false if value.nil? MODE_ENUM.include?(value) end |