Class: Rubyzilla::Product
- Inherits:
-
Object
- Object
- Rubyzilla::Product
- Defined in:
- lib/rubyzilla/product.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
-
.list(s = "accessible") ⇒ Object
accessible, enterable, selectable.
Instance Method Summary collapse
- #components ⇒ Object
-
#initialize(id) ⇒ Product
constructor
A new instance of Product.
- #milestones ⇒ Object
- #to_s ⇒ Object
- #versions ⇒ Object
Constructor Details
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/rubyzilla/product.rb', line 3 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/rubyzilla/product.rb', line 3 def name @name end |
Class Method Details
.list(s = "accessible") ⇒ Object
accessible, enterable, selectable
12 13 14 15 16 17 18 19 20 |
# File 'lib/rubyzilla/product.rb', line 12 def self.list s="accessible" product_list = Array.new product_ids = Bugzilla.server.call("Product.get_#{s}_products")["ids"] product_ids.map {|id| product_list << Product.new(id)} return product_list end |
Instance Method Details
#components ⇒ Object
22 23 24 25 26 27 |
# File 'lib/rubyzilla/product.rb', line 22 def components result = Bugzilla.server.call("Bug.legal_values", { :field => 'component', :product_id => @id }) return result["values"] end |
#milestones ⇒ Object
29 30 31 32 33 34 |
# File 'lib/rubyzilla/product.rb', line 29 def milestones result = Bugzilla.server.call("Bug.legal_values", { :field => 'target_milestone', :product_id => @id }) result["values"] end |
#to_s ⇒ Object
43 44 45 |
# File 'lib/rubyzilla/product.rb', line 43 def to_s @name end |