Sha256: 59ea0305ec776d9ab012ceb6e1c2dd140e72b413a9fac4a967c42a6af549a71b
Contents?: true
Size: 539 Bytes
Versions: 15
Compression:
Stored size: 539 Bytes
Contents
module Pansophy module Remote class ReadFileHead include Adamantium::Flat def initialize(bucket, path) @bucket = bucket @pathname = Pathname.new(path) end def call fail ArgumentError, "#{@pathname} does not exist" if file.nil? file end private def file directory.files.head(@pathname.to_s) end memoize :file def directory ReadDirectory.new(@bucket, @pathname).call end memoize :directory end end end
Version data entries
15 entries across 15 versions & 1 rubygems