class SaveMetadata

Attributes

history[R]
wraith[R]

Public Class Methods

new(config, history) click to toggle source
# File lib/wraith/helpers/save_metadata.rb, line 7
def initialize(config, history)
  @wraith = config
  @history = history
end

Public Instance Methods

base_label() click to toggle source
# File lib/wraith/helpers/save_metadata.rb, line 23
def base_label
  "#{wraith.base_domain_label}#{history_label}"
end
compare_label() click to toggle source
# File lib/wraith/helpers/save_metadata.rb, line 27
def compare_label
  "#{wraith.comp_domain_label}#{history_label}"
end
engine() click to toggle source
# File lib/wraith/helpers/save_metadata.rb, line 31
def engine
  wraith.engine
end
file_names(width, label, domain_label) click to toggle source
# File lib/wraith/helpers/save_metadata.rb, line 16
def file_names(width, label, domain_label)
  width = "MULTI" if width.is_a? Array

  FileUtils::mkdir_p "#{wraith.directory}/#{label}"   # ensure the directory exists
  "#{wraith.directory}/#{label}/#{width}_#{engine}_#{domain_label}.png"
end
history_label() click to toggle source
# File lib/wraith/helpers/save_metadata.rb, line 12
def history_label
  history ? "_latest" : ""
end