class Potatochop::FileSystemInterface

Attributes

source[R]

Public Class Methods

new(source, options = {}) click to toggle source
# File lib/potatochop/file_system_interface.rb, line 5
def initialize(source, options = {})
  @source = source
end

Public Instance Methods

exists?(file_name) click to toggle source
# File lib/potatochop/file_system_interface.rb, line 9
def exists?(file_name)
  file_path = File.join(@source, file_name)
  File.exists? file_path
end
read(file_name) click to toggle source
# File lib/potatochop/file_system_interface.rb, line 14
def read(file_name)
  file_path = File.join(@source, file_name)
  File.read(file_path)
end