Class: Flico::SaveCollage

Inherits:
Object
  • Object
show all
Defined in:
lib/flico/saver.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#output_file_nameObject

Returns the value of attribute output_file_name.



23
24
25
# File 'lib/flico/saver.rb', line 23

def output_file_name
  @output_file_name
end

Instance Method Details

#call(file_path) ⇒ Object



25
26
27
28
29
# File 'lib/flico/saver.rb', line 25

def call(file_path)
  file_name = output_file_name || validate_file_name
  FileUtils.mv file_path, file_name
  puts "Flicollage saved at #{file_name}"
end