Class: PopulateEnv::Heroku::Compilation
- Inherits:
-
Object
- Object
- PopulateEnv::Heroku::Compilation
- Defined in:
- lib/populate_env/heroku/compilation.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #attribute_definitions ⇒ Object
- #content ⇒ Object
-
#initialize(options) ⇒ Compilation
constructor
A new instance of Compilation.
- #manifest ⇒ Object
- #perform ⇒ Object
- #remote_config ⇒ Object
- #sections ⇒ Object
Constructor Details
#initialize(options) ⇒ Compilation
Returns a new instance of Compilation.
6 7 8 |
# File 'lib/populate_env/heroku/compilation.rb', line 6 def initialize() @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/populate_env/heroku/compilation.rb', line 4 def @options end |
Instance Method Details
#attribute_definitions ⇒ Object
14 15 16 |
# File 'lib/populate_env/heroku/compilation.rb', line 14 def attribute_definitions manifest.attribute_definitions_for(.manifest_environment) end |
#content ⇒ Object
29 30 31 |
# File 'lib/populate_env/heroku/compilation.rb', line 29 def content sections.compact.join("\n") end |
#manifest ⇒ Object
10 11 12 |
# File 'lib/populate_env/heroku/compilation.rb', line 10 def manifest Manifest.new(.manifest) end |
#perform ⇒ Object
33 34 35 |
# File 'lib/populate_env/heroku/compilation.rb', line 33 def perform .destination.write(content) end |
#remote_config ⇒ Object
18 19 20 |
# File 'lib/populate_env/heroku/compilation.rb', line 18 def remote_config @remote_config ||= RemoteConfig.new() end |
#sections ⇒ Object
22 23 24 25 26 27 |
# File 'lib/populate_env/heroku/compilation.rb', line 22 def sections attribute_definitions.map do |definition| attribute = AttributeCompilation.new(definition, , remote_config).perform Formatters::EnvShellSection.new(attribute, export: .export) if attribute end end |