Class: Textus::Read::Published

Inherits:
Object
  • Object
show all
Defined in:
lib/textus/read/published.rb

Instance Method Summary collapse

Constructor Details

#initialize(container:, call: nil) ⇒ Published

rubocop:disable Lint/UnusedMethodArgument



4
5
6
# File 'lib/textus/read/published.rb', line 4

def initialize(container:, call: nil) # rubocop:disable Lint/UnusedMethodArgument
  @manifest = container.manifest
end

Instance Method Details

#callObject



8
9
10
11
12
# File 'lib/textus/read/published.rb', line 8

def call
  @manifest.data.entries.reject { |e| e.publish_to.empty? }.map do |e|
    { "key" => e.key, "publish_to" => e.publish_to }
  end
end