Class: Coltrane::Commands::GetRepresentationNotes

Inherits:
Command
  • Object
show all
Defined in:
lib/coltrane/commands/get_representation_notes.rb

Instance Attribute Summary

Attributes inherited from Command

#error

Instance Method Summary collapse

Methods inherited from Command

run

Instance Method Details

#run(representation, notes) ⇒ Object



4
5
6
7
8
9
# File 'lib/coltrane/commands/get_representation_notes.rb', line 4

def run(representation, notes)
  return notes if representation == 'Text'
  Object
    .const_get("Coltrane::Representation::#{representation}")
    .find_notes(notes)
end