Class: Dude::Interface
- Inherits:
-
Object
- Object
- Dude::Interface
- Includes:
- Settings
- Defined in:
- lib/dude/interface.rb
Constant Summary
Constants included from Settings
Instance Method Summary collapse
-
#initialize ⇒ Interface
constructor
A new instance of Interface.
- #issues_list(issues) ⇒ Object
- #report(worked_week, worked_today) ⇒ Object
Methods included from Settings
Constructor Details
#initialize ⇒ Interface
Returns a new instance of Interface.
8 9 |
# File 'lib/dude/interface.rb', line 8 def initialize end |
Instance Method Details
#issues_list(issues) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/dude/interface.rb', line 17 def issues_list(issues) [['To Do', :yellow], ['Doing', :green], ['To Verify', :blue]].each do |group, color| puts "#{group}:".colorize(color).bold grouped = issues.select {|i| i.last.include?(group)} if grouped.length.zero? puts 'Nothing' else grouped.each do |id, issue, labels| puts "#{id}:".colorize(color) + " #{issue} #{labels.compact.to_s.gsub('"', "")}" end end puts '' end end |
#report(worked_week, worked_today) ⇒ Object
11 12 13 14 15 |
# File 'lib/dude/interface.rb', line 11 def report(worked_week, worked_today) report_weekly(worked_week) puts '' report_daily(worked_today, worked_week) end |