Class: Lighthouse::Bin
- Inherits:
-
Object
- Object
- Lighthouse::Bin
- Includes:
- Buildmeister::JSONUtils
- Defined in:
- lib/lighthouse/bin.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
-
#tickets_count ⇒ Object
readonly
Returns the value of attribute tickets_count.
Instance Method Summary collapse
-
#initialize(project, attrs) ⇒ Bin
constructor
A new instance of Bin.
- #tickets ⇒ Object
Methods included from Buildmeister::JSONUtils
Constructor Details
#initialize(project, attrs) ⇒ Bin
Returns a new instance of Bin.
7 8 9 10 11 12 13 14 15 |
# File 'lib/lighthouse/bin.rb', line 7 def initialize(project, attrs) @project = project @name = attrs['name'] @id = attrs['id'] @query = attrs['query'] @tickets_count = attrs['tickets_count'] end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/lighthouse/bin.rb', line 5 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/lighthouse/bin.rb', line 5 def name @name end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
5 6 7 |
# File 'lib/lighthouse/bin.rb', line 5 def query @query end |
#tickets_count ⇒ Object (readonly)
Returns the value of attribute tickets_count.
5 6 7 |
# File 'lib/lighthouse/bin.rb', line 5 def tickets_count @tickets_count end |
Instance Method Details
#tickets ⇒ Object
17 18 19 |
# File 'lib/lighthouse/bin.rb', line 17 def tickets @project.tickets(@query) end |