Class: ReleaseFile
- Inherits:
-
Object
- Object
- ReleaseFile
- Defined in:
- lib/karist/release_file.rb
Instance Attribute Summary collapse
-
#env_path ⇒ Object
readonly
Returns the value of attribute env_path.
-
#releases ⇒ Object
readonly
Returns the value of attribute releases.
-
#templates_path ⇒ Object
readonly
Returns the value of attribute templates_path.
Instance Method Summary collapse
- #display_all ⇒ Object
-
#initialize(release_file, env_path, templates_path) ⇒ ReleaseFile
constructor
A new instance of ReleaseFile.
- #render_all ⇒ Object
Constructor Details
#initialize(release_file, env_path, templates_path) ⇒ ReleaseFile
Returns a new instance of ReleaseFile.
6 7 8 9 10 11 12 13 |
# File 'lib/karist/release_file.rb', line 6 def initialize(release_file, env_path, templates_path) @env_path = env_path @templates_path = templates_path @releases = release_file.fetch(:releases, []).map do |release| Release.new(release, self) end end |
Instance Attribute Details
#env_path ⇒ Object (readonly)
Returns the value of attribute env_path.
4 5 6 |
# File 'lib/karist/release_file.rb', line 4 def env_path @env_path end |
#releases ⇒ Object (readonly)
Returns the value of attribute releases.
4 5 6 |
# File 'lib/karist/release_file.rb', line 4 def releases @releases end |
#templates_path ⇒ Object (readonly)
Returns the value of attribute templates_path.
4 5 6 |
# File 'lib/karist/release_file.rb', line 4 def templates_path @templates_path end |
Instance Method Details
#display_all ⇒ Object
21 22 23 24 25 |
# File 'lib/karist/release_file.rb', line 21 def display_all @releases.map do |release| release.marshal_all_yaml end end |
#render_all ⇒ Object
15 16 17 18 19 |
# File 'lib/karist/release_file.rb', line 15 def render_all @releases.each do |release| release.render end end |