lib/cli/notes.rb in coltrane-1.0.2 vs lib/cli/notes.rb in coltrane-1.0.11
- old
+ new
@@ -1,21 +1,18 @@
-# frozen_string_literal: true
-
module Coltrane
module Cli
- # Interfaces notes outputting functionality with the lib
class Notes
- def initialize(notes, on: 'text', desc: nil, flavor: 'notes')
- @desc = desc || 'The notes you supplied:'
+ def initialize(notes, on: 'text', desc: 'The notes you supplied:', flavor: 'notes')
+ @desc = desc
flavor = flavor.underscore.to_sym
on = on.to_sym
notes = Coltrane::NoteSet.new(notes)
@representation = Representation.build(on, notes, flavor)
render
end
def render
- puts "\n" + [@desc, @representation.render].join("\n" * 2)
+ puts "\n"+[@desc, @representation.render].join("\n"*2)
end
end
end
-end
+end
\ No newline at end of file