class ConcourseObjects::Resources::DockerCompose::OutParams

Constants

ACCEPTABLE_COMMANDS
CommandIsAcceptable
DEFAULT_COMMAND
DEFAULT_COMPOSE_FILE
DEFAULT_PRINT
DEFAULT_PULL

Public Class Methods

new(options = {}) { |this, options| ... } click to toggle source
Calls superclass method ConcourseObjects::Object::new
# File lib/concourse-objects/resources/docker-compose.rb, line 105
def initialize(options = {})
  super(options) do |this, options|
    case this.command
    when "up"      then Options::Up.(options)
    when "down"    then Options::Down.(options)
    when "start"   then Options::Start.(options)
    when "stop"    then Options::Stop.(options)
    when "restart" then Options::Restart.(options)
    when "kill"    then Options::Kill.(options)
    else Options.(options)
    end.yield_self do |options|
      this.send(:instance_variable_set, :@options, options)
    end

    yield this, options if block_given?
  end
end