Class: Router

Inherits:
Object
  • Object
show all
Defined in:
lib/aws_docker_utils/router.rb

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ Router

Returns a new instance of Router.



6
7
8
# File 'lib/aws_docker_utils/router.rb', line 6

def initialize(opts={})
  @opts = opts
end

Instance Method Details

#route!Object



10
11
12
13
14
15
16
# File 'lib/aws_docker_utils/router.rb', line 10

def route!
  case
  when @opts.fetch('configure')   then AwsDockerUtils::Controllers::Configurator.new(@opts)
  when @opts.fetch('backup_file') then AwsDockerUtils::Controllers::S3.new(@opts)
  else raise "NOP"
  end
end