Class: CosiTemp

Inherits:
Object
  • Object
show all
Defined in:
lib/cosi-temp.rb

Instance Method Summary collapse

Constructor Details

#initializeCosiTemp

Returns a new instance of CosiTemp.



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/cosi-temp.rb', line 6

def initialize
  if ARGV[0].downcase == "meeting"
    puts "Making a meeting temp"
    meeting = MeetingsGenerator.new(Date.today)
    meeting.to_file
  elsif ARGV[0].downcase == "project"
    puts "Making a project temp"
    author = ARGV[ARGV.find_index("-author")+1]
    title = ARGV[ARGV.find_index("-name")+1]
    project = ProjectsGenerator.new(author, title, Date.today)
    project.to_file
  end
end