Class: Textus::Read::Published

Inherits:
Object
  • Object
show all
Extended by:
Contract::DSL
Defined in:
lib/textus/read/published.rb

Instance Method Summary collapse

Methods included from Contract::DSL

arg, around, cli, cli_stdin, contract, contract?, summary, surfaces, verb, view

Constructor Details

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

rubocop:disable Lint/UnusedMethodArgument



11
12
13
# File 'lib/textus/read/published.rb', line 11

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

Instance Method Details

#callObject



15
16
17
18
19
# File 'lib/textus/read/published.rb', line 15

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