Class: Coltrane::Cli::Text
- Inherits:
-
Representation
- Object
- Representation
- Coltrane::Cli::Text
- Defined in:
- lib/cli/text.rb
Overview
A text representation
Constant Summary
Constants inherited from Representation
Representation::ACCEPTED_FLAVORS
Instance Method Summary collapse
Methods inherited from Representation
build, #hint, inherited, #initialize
Constructor Details
This class inherits a constructor from Coltrane::Cli::Representation
Instance Method Details
#render ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/cli/text.rb', line 7 def render case @flavor when :marks, :notes, :degrees then @notes.pretty_names.join(' ') when :intervals then @notes.map { |n| (@notes.first - n).name }.join(' ') else raise WrongFlavorError end end |