Class: ComposeEnv::Builder
- Inherits:
-
Object
- Object
- ComposeEnv::Builder
- Defined in:
- lib/compose_env/builder.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #build_compose_files ⇒ Object (also: #build_compose_files!)
-
#initialize(options) ⇒ Builder
constructor
A new instance of Builder.
- #parse_all ⇒ Object
Constructor Details
#initialize(options) ⇒ Builder
Returns a new instance of Builder.
5 6 7 |
# File 'lib/compose_env/builder.rb', line 5 def initialize() @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/compose_env/builder.rb', line 3 def @options end |
Instance Method Details
#build_compose_files ⇒ Object Also known as: build_compose_files!
9 10 11 12 13 |
# File 'lib/compose_env/builder.rb', line 9 def build_compose_files parse_all do |current_env, raw_yaml| File.write(environment_file_name(current_env), raw_yaml) end end |
#parse_all ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/compose_env/builder.rb', line 16 def parse_all .envs.map do |current_env| result = [current_env, parse_file(current_env)] yield(*result) if block_given? result end.to_h end |