Class: Crusoe::CLI
- Inherits:
-
Thor
- Object
- Thor
- Crusoe::CLI
- Defined in:
- lib/crusoe/cli.rb
Instance Method Summary collapse
-
#initialize ⇒ CLI
constructor
A new instance of CLI.
- #journal ⇒ Object
- #read ⇒ Object
- #report ⇒ Object
- #update_toc ⇒ Object
Constructor Details
#initialize ⇒ CLI
Returns a new instance of CLI.
14 15 16 17 18 |
# File 'lib/crusoe/cli.rb', line 14 def initialize(...) @configuration = Configuration.new @interface = Interface.new super(...) end |
Instance Method Details
#journal ⇒ Object
24 25 26 27 28 29 |
# File 'lib/crusoe/cli.rb', line 24 def journal fetch_remote_repo date = parse_date_option([:date]) write(date) update_remote_repo end |
#read ⇒ Object
33 34 35 36 37 |
# File 'lib/crusoe/cli.rb', line 33 def read update_remote_repo date = parse_date_option([:date]) read_dates(date) end |
#report ⇒ Object
40 41 42 43 44 45 46 |
# File 'lib/crusoe/cli.rb', line 40 def report update_remote_repo today = Date.today days_to_last_monday = (today.wday - 1) % 7 last_monday = today - days_to_last_monday read_dates(last_monday..today) end |
#update_toc ⇒ Object
50 51 52 |
# File 'lib/crusoe/cli.rb', line 50 def update_toc puts "TODO: Add GitCommit" end |