class Pansophy::Remote::ReadDirectory

Public Class Methods

new(bucket, path) click to toggle source
# File lib/pansophy/remote/read_directory.rb, line 6
def initialize(bucket, path)
  @bucket   = bucket
  @pathname = Pathname.new(path)
end

Public Instance Methods

call() click to toggle source
# File lib/pansophy/remote/read_directory.rb, line 11
def call
  Pansophy.connection.directories.get(@bucket, prefix: @pathname.to_s).tap do |directory|
    fail ArgumentError, "Could not find bucket #{@bucket}" if directory.nil?
  end
end