Class: ComposeEnv::InputParser

Inherits:
Object
  • Object
show all
Defined in:
lib/compose_env/input_parser.rb

Overview

Parse input options. Prepare the options for being pipelined to the follow-up processors.

Defined Under Namespace

Classes: Options

Constant Summary collapse

DEFAULT_ENVS =
%i[development staging production].freeze
DEFAULT_FILE =
'docker-compose.yml.erb'.freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.parse(options) ⇒ Object



10
11
12
# File 'lib/compose_env/input_parser.rb', line 10

def self.parse(options)
  new.parse(options)
end

Instance Method Details

#parse(options) ⇒ Object



14
15
16
17
18
# File 'lib/compose_env/input_parser.rb', line 14

def parse(options)
  prepared_options = prepare(options)
  option_parser.parse!(prepared_options)
  return args
end