Class: Pansophy::Remote::ReadDirectory
- Inherits:
-
Object
- Object
- Pansophy::Remote::ReadDirectory
- Includes:
- Adamantium::Flat
- Defined in:
- lib/pansophy/remote/read_directory.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(bucket, path) ⇒ ReadDirectory
constructor
A new instance of ReadDirectory.
Constructor Details
#initialize(bucket, path) ⇒ ReadDirectory
Returns a new instance of ReadDirectory.
6 7 8 9 |
# File 'lib/pansophy/remote/read_directory.rb', line 6 def initialize(bucket, path) @bucket = bucket @pathname = Pathname.new(path) end |
Instance Method Details
#call ⇒ Object
11 12 13 14 15 |
# 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 |