Class: Lighthouse::Bin

Inherits:
Object
  • Object
show all
Includes:
Buildmeister::JSONUtils
Defined in:
lib/lighthouse/bin.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Buildmeister::JSONUtils

#with_json_response

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

#idObject (readonly)

Returns the value of attribute id.



5
6
7
# File 'lib/lighthouse/bin.rb', line 5

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/lighthouse/bin.rb', line 5

def name
  @name
end

#queryObject (readonly)

Returns the value of attribute query.



5
6
7
# File 'lib/lighthouse/bin.rb', line 5

def query
  @query
end

#tickets_countObject (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

#ticketsObject



17
18
19
# File 'lib/lighthouse/bin.rb', line 17

def tickets
  @project.tickets(@query)
end