Class: Textus::Application::Reads::List
- Inherits:
-
Object
- Object
- Textus::Application::Reads::List
- Defined in:
- lib/textus/application/reads/list.rb
Instance Method Summary collapse
- #call(prefix: nil, zone: nil) ⇒ Object
-
#initialize(manifest:) ⇒ List
constructor
A new instance of List.
Constructor Details
#initialize(manifest:) ⇒ List
Returns a new instance of List.
5 6 7 |
# File 'lib/textus/application/reads/list.rb', line 5 def initialize(manifest:) @manifest = manifest end |
Instance Method Details
#call(prefix: nil, zone: nil) ⇒ Object
9 10 11 12 13 |
# File 'lib/textus/application/reads/list.rb', line 9 def call(prefix: nil, zone: nil) rows = @manifest.resolver.enumerate(prefix: prefix) rows = rows.select { |r| r[:manifest_entry].zone == zone } if zone rows.map { |row| { "key" => row[:key], "zone" => row[:manifest_entry].zone, "path" => row[:path] } } end |