Class: Alf::Adapter::Folder
- Inherits:
-
Alf::Adapter
- Object
- Alf::Adapter
- Alf::Adapter::Folder
- Defined in:
- lib/alf/adapter/folder.rb,
lib/alf/adapter/folder/connection.rb
Defined Under Namespace
Classes: Connection
Instance Attribute Summary
Attributes inherited from Alf::Adapter
Class Method Summary collapse
Instance Method Summary collapse
-
#connection ⇒ Object
Returns a connection on the underlying folder.
- #to_s ⇒ Object
Methods inherited from Alf::Adapter
autodetect, #connect, factor, #initialize, register
Methods included from Support::Registry
#each, #listen, #listeners, #register, #registered
Constructor Details
This class inherits a constructor from Alf::Adapter
Class Method Details
.recognizes?(conn_spec) ⇒ Boolean
9 10 11 |
# File 'lib/alf/adapter/folder.rb', line 9 def self.recognizes?(conn_spec) Path.like?(conn_spec) && Path(conn_spec).directory? end |
Instance Method Details
#connection ⇒ Object
Returns a connection on the underlying folder
14 15 16 |
# File 'lib/alf/adapter/folder.rb', line 14 def connection Folder::Connection.new(Path(conn_spec)) end |
#to_s ⇒ Object
18 19 20 |
# File 'lib/alf/adapter/folder.rb', line 18 def to_s "Alf::Adapter::Folder(#{conn_spec})" end |