Sha256: e91e2293a3d2d671a6bde13ce218c0d0338394a8e51e491c13e98d46989f64f8

Contents?: true

Size: 775 Bytes

Versions: 17

Compression:

Stored size: 775 Bytes

Contents

module Foobara
  class CommandConnector
    module Commands
      class Describe < Foobara::Command
        inputs manifestable: :duck,
               request: :duck
        result :associative_array

        def execute
          build_manifest
          stamp_request_metadata

          manifest
        end

        attr_accessor :manifest

        def build_manifest
          self.manifest = if manifestable.is_a?(CommandConnector)
                            manifestable.foobara_manifest
                          else
                            manifestable.foobara_manifest(to_include: Set.new)
                          end
        end

        def stamp_request_metadata
          manifest[:metadata] = { when: Time.now }
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
foobara-0.0.26 projects/command_connectors/src/command_connector/commands/describe.rb
foobara-0.0.25 projects/command_connectors/src/command_connector/commands/describe.rb
foobara-0.0.24 projects/command_connectors/src/command_connector/commands/describe.rb
foobara-0.0.23 projects/command_connectors/src/command_connector/commands/describe.rb
foobara-0.0.22 projects/command_connectors/src/command_connector/commands/describe.rb
foobara-0.0.21 projects/command_connectors/src/command_connector/commands/describe.rb
foobara-0.0.20 projects/command_connectors/src/command_connector/commands/describe.rb
foobara-0.0.19 projects/command_connectors/src/command_connector/commands/describe.rb
foobara-0.0.18 projects/command_connectors/src/command_connector/commands/describe.rb
foobara-0.0.17 projects/command_connectors/src/command_connector/commands/describe.rb
foobara-0.0.16 projects/command_connectors/src/command_connector/commands/describe.rb
foobara-0.0.15 projects/command_connectors/src/command_connector/commands/describe.rb
foobara-0.0.14 projects/command_connectors/src/command_connector/commands/describe.rb
foobara-0.0.13 projects/command_connectors/src/command_connector/commands/describe.rb
foobara-0.0.12 projects/command_connectors/src/command_connector/commands/describe.rb
foobara-0.0.11 projects/command_connectors/src/command_connector/commands/describe.rb
foobara-0.0.10 projects/command_connectors/src/command_connector/commands/describe.rb