Class: BambooApi::Project
- Inherits:
-
Object
- Object
- BambooApi::Project
- Defined in:
- lib/bamboo_api/project.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#link ⇒ Object
readonly
Returns the value of attribute link.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(link, key, name) ⇒ Project
constructor
A new instance of Project.
Constructor Details
#initialize(link, key, name) ⇒ Project
Returns a new instance of Project.
5 6 7 8 9 |
# File 'lib/bamboo_api/project.rb', line 5 def initialize link, key, name @link = link @key = key @name = name end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
3 4 5 |
# File 'lib/bamboo_api/project.rb', line 3 def key @key end |
#link ⇒ Object (readonly)
Returns the value of attribute link.
3 4 5 |
# File 'lib/bamboo_api/project.rb', line 3 def link @link end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/bamboo_api/project.rb', line 3 def name @name end |
Class Method Details
.all ⇒ Object
25 26 27 |
# File 'lib/bamboo_api/project.rb', line 25 def self.all BambooApi::Project.parse( BambooApi.request "project" ) end |
.find(key) ⇒ Object
29 30 31 |
# File 'lib/bamboo_api/project.rb', line 29 def self.find key BambooApi::Project.parse_single( BambooApi.request "project/#{key}" ) end |
.parse(projects) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/bamboo_api/project.rb', line 11 def self.parse projects parsed_projects = [] projects[ "projects" ][ "project" ].each do | project | parsed_projects.push( BambooApi::Project.parse_single( project ) ) end parsed_projects end |