Class: Cody::List::Project
- Inherits:
-
Object
- Object
- Cody::List::Project
- Extended by:
- Memoist
- Includes:
- AwsServices
- Defined in:
- lib/cody/list/project.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #build ⇒ Object (also: #load)
- #build_id ⇒ Object
-
#initialize(name) ⇒ Project
constructor
A new instance of Project.
Methods included from AwsServices
Methods included from AwsServices::Helpers
#are_you_sure?, #inferred_project_name, #inferred_stack_name, #project_name_convention, #stack_exists?
Constructor Details
#initialize(name) ⇒ Project
Returns a new instance of Project.
10 11 12 |
# File 'lib/cody/list/project.rb', line 10 def initialize(name) @name = name # Simple string end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/cody/list/project.rb', line 9 def name @name end |
Instance Method Details
#build ⇒ Object Also known as: load
14 15 16 17 |
# File 'lib/cody/list/project.rb', line 14 def build resp = codebuild.batch_get_builds(ids: [build_id]) resp.builds.first # most recent build end |
#build_id ⇒ Object
21 22 23 24 |
# File 'lib/cody/list/project.rb', line 21 def build_id resp = codebuild.list_builds_for_project(project_name: @name) resp.ids.first # most recent build_id end |