class StreamdeckProf::FileList

Public Class Methods

new() click to toggle source
# File lib/streamdeck_prof/file_list.rb, line 5
def initialize
  @files = {}
end

Public Instance Methods

[](path) click to toggle source
# File lib/streamdeck_prof/file_list.rb, line 9
def [](path)
  @files[path]
end
[]=(path, file) click to toggle source
# File lib/streamdeck_prof/file_list.rb, line 13
def []=(path, file)
  if file.nil?
    @files.delete(path)
  else
    @files[path] = file
  end
end
save(storage_path) click to toggle source
# File lib/streamdeck_prof/file_list.rb, line 27
def save(storage_path)
  @files.each { |path, file| file.save(File.join(storage_path, path)) }
end
to_h()
Alias for: to_hash
to_hash() click to toggle source
# File lib/streamdeck_prof/file_list.rb, line 21
def to_hash
  @files
end
Also aliased as: to_h