Class: Tlog::Command_Suite

Inherits:
Object
  • Object
show all
Defined in:
lib/tlog/command_suite.rb

Overview

Simple helper class that handles an array of commands

Class Method Summary collapse

Class Method Details

.commandsObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/tlog/command_suite.rb', line 6

def commands
	storage = self.working_dir_storage
	commands = [
		Tlog::Command::Start.new,
		Tlog::Command::Stop.new,
		Tlog::Command::Help.new,
		Tlog::Command::Active.new,
		Tlog::Command::Delete.new,
		Tlog::Command::Display.new,
		Tlog::Command::Create.new,
		Tlog::Command::Checkout.new,
		Tlog::Command::State.new,
		Tlog::Command::Points.new,
		Tlog::Command::Owner.new
	]
	commands.each do |command|
		command.storage = storage
		command.seconds_format = Tlog::Format::Seconds
		command.date_time_format = Tlog::Format::DateTime 
	end
	commands
end

.working_dir_storageObject



29
30
31
# File 'lib/tlog/command_suite.rb', line 29

def working_dir_storage
	Tlog::Storage::Disk.new('.')
end