Class: FileScanner::Client
- Inherits:
-
Object
- Object
- FileScanner::Client
- Defined in:
- lib/file_scanner/client.rb
Overview
Create a scanner client
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#initialize(dir, **options) ⇒ Client
constructor
Create a new Scanner.
Constructor Details
#initialize(dir, **options) ⇒ Client
Create a new Scanner
15 16 17 18 19 20 |
# File 'lib/file_scanner/client.rb', line 15 def initialize(dir, **) @nested = [:nested] @extension = [:extension].nil? ? "*.mp4" : [:extension] @logger = [:logger] || $stdout @dir = dir end |
Instance Method Details
#each(&block) ⇒ Object
23 24 25 26 |
# File 'lib/file_scanner/client.rb', line 23 def each(&block) @block = block process_directory(@dir) end |