Class: Dckerize::Runner
- Inherits:
-
Object
- Object
- Dckerize::Runner
- Defined in:
- lib/dckerize/runner.rb
Constant Summary collapse
- ERROR_MESSAGE =
'USAGE: dckerize up APP_NAME'
- CONF_FOLDER_EXISTS =
'ERROR: conf folder already exists.'
- DOCKERFILE_EXISTS =
'ERROR: Dockerfile.development already exists.'
- DOCKERCOMPOSE_EXISTS =
'ERROR: docker-compose already exists.'
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(options) ⇒ Runner
constructor
A new instance of Runner.
- #valid? ⇒ Boolean
Constructor Details
#initialize(options) ⇒ Runner
Returns a new instance of Runner.
8 9 10 |
# File 'lib/dckerize/runner.rb', line 8 def initialize() @options = end |
Instance Method Details
#execute ⇒ Object
12 13 14 15 |
# File 'lib/dckerize/runner.rb', line 12 def execute raise ERROR_MESSAGE unless valid? Dckerize::Generator.new(@options[1]).up end |
#valid? ⇒ Boolean
17 18 19 20 21 |
# File 'lib/dckerize/runner.rb', line 17 def valid? # first option should always be up return false if @options[0] != 'up' true end |