Class: CircleCI::Project
- Inherits:
-
Object
- Object
- CircleCI::Project
- Defined in:
- lib/mina-circle/circle-ci/project.rb
Instance Attribute Summary collapse
- #artifacts ⇒ Object
-
#branch ⇒ Object
readonly
Returns the value of attribute branch.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#organization ⇒ Object
readonly
Returns the value of attribute organization.
-
#vcs_type ⇒ Object
readonly
Returns the value of attribute vcs_type.
Instance Method Summary collapse
- #api_path ⇒ Object
- #build_path ⇒ Object
-
#initialize(organization:, name:, branch:, vcs_type: 'github') ⇒ Project
constructor
A new instance of Project.
Constructor Details
#initialize(organization:, name:, branch:, vcs_type: 'github') ⇒ Project
Returns a new instance of Project.
4 5 6 7 8 9 |
# File 'lib/mina-circle/circle-ci/project.rb', line 4 def initialize(organization:, name:, branch:, vcs_type: 'github') @organization = organization @name = name @vcs_type = vcs_type @branch = branch end |
Instance Attribute Details
#artifacts ⇒ Object
11 12 13 |
# File 'lib/mina-circle/circle-ci/project.rb', line 11 def artifacts @artifacts ||= fetch_artifacts end |
#branch ⇒ Object (readonly)
Returns the value of attribute branch.
3 4 5 |
# File 'lib/mina-circle/circle-ci/project.rb', line 3 def branch @branch end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/mina-circle/circle-ci/project.rb', line 3 def name @name end |
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
3 4 5 |
# File 'lib/mina-circle/circle-ci/project.rb', line 3 def organization @organization end |
#vcs_type ⇒ Object (readonly)
Returns the value of attribute vcs_type.
3 4 5 |
# File 'lib/mina-circle/circle-ci/project.rb', line 3 def vcs_type @vcs_type end |
Instance Method Details
#api_path ⇒ Object
15 16 17 |
# File 'lib/mina-circle/circle-ci/project.rb', line 15 def api_path api_path_parts.join('/') end |
#build_path ⇒ Object
19 20 21 22 23 |
# File 'lib/mina-circle/circle-ci/project.rb', line 19 def build_path parts = api_path_parts + ['tree', real_branch] parts.compact.join('/') end |