Module: Dockerspec::Helper::MultipleSourcesDescription
- Included in:
- Builder, Runner::Compose, Runner::Docker
- Defined in:
- lib/dockerspec/helper/multiple_sources_description.rb
Overview
Methods to generate the correct object description for objects that has a source attribute.
Shortens the docker IDs automatically.
Requirements:
source
method: Returns the source you are using to generating your object.:@options
attribute: The options array with the configuration options, including the source.
Instance Method Summary collapse
-
#description(prefix) ⇒ String
private
Generates a description of the object.
Instance Method Details
#description(prefix) ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Generates a description of the object.
61 62 63 64 65 |
# File 'lib/dockerspec/helper/multiple_sources_description.rb', line 61 def description(prefix) value = @options[source] desc = send("description_from_#{source}", value) "#{prefix} #{source.to_s.tr('_', ' ')}: \"#{desc}\"" end |