Class: CreateFile

Inherits:
EdrGenBase show all
Defined in:
lib/edr_gen/create_file.rb

Constant Summary collapse

ACTIVITY =
"file_changes"

Constants included from YamlLogger

YamlLogger::LOG_DIRECTORY

Instance Method Summary collapse

Methods included from YamlLogger

write

Constructor Details

#initialize(args) ⇒ CreateFile

Returns a new instance of CreateFile.



6
7
8
9
10
11
12
13
# File 'lib/edr_gen/create_file.rb', line 6

def initialize(args)
  @args = args

  validate_args
  set_command

  super(@args.slice(0..1))
end

Instance Method Details

#callObject



15
16
17
18
19
# File 'lib/edr_gen/create_file.rb', line 15

def call
  puts "  Attempting to create file..."
  execute_process
  puts "  File created: #{@args[0]}"
end