Class: Coltrane::Cli::Notes
- Inherits:
-
Object
- Object
- Coltrane::Cli::Notes
- Defined in:
- lib/cli/notes.rb
Overview
Interfaces notes outputting functionality with the lib
Instance Method Summary collapse
-
#initialize(notes, on: 'text', desc: nil, flavor: 'notes') ⇒ Notes
constructor
A new instance of Notes.
- #render ⇒ Object
Constructor Details
#initialize(notes, on: 'text', desc: nil, flavor: 'notes') ⇒ Notes
Returns a new instance of Notes.
7 8 9 10 11 12 13 14 |
# File 'lib/cli/notes.rb', line 7 def initialize(notes, on: 'text', desc: nil, flavor: 'notes') @desc = desc || 'The notes you supplied:' flavor = flavor.underscore.to_sym on = on.to_sym notes = Coltrane::NoteSet.new(notes) @representation = Representation.build(on, notes, flavor) render end |
Instance Method Details
#render ⇒ Object
16 17 18 |
# File 'lib/cli/notes.rb', line 16 def render puts "\n" + [@desc, @representation.render].join("\n" * 2) end |