lib/vimgolf_finder/challenge.rb in vimgolf-finder-0.1.2 vs lib/vimgolf_finder/challenge.rb in vimgolf-finder-0.1.3
- old
+ new
@@ -2,10 +2,10 @@
class Challenge
attr_accessor :id, :title, :entries
attr_accessor :description
attr_accessor :start_file, :end_file, :view_diff
- def print(index)
+ def print(index = 1)
if self.solved?
VimGolfFinder.ui.log "#{index}. \e[37m#{self.title}\e[0m - #{self.entries} entries (\e[33m#{self.id}\e[0m) [\u2713]"
else
VimGolfFinder.ui.log "#{index}. \e[37m#{self.title}\e[0m - #{self.entries} entries (\e[33m#{self.id}\e[0m)"
end
\ No newline at end of file