Class: Tc4r::BuildType
- Inherits:
-
Object
- Object
- Tc4r::BuildType
- Includes:
- ActiveModel::Serializers::JSON
- Defined in:
- lib/tc4r/build_type.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#href ⇒ Object
readonly
Returns the value of attribute href.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#project_id ⇒ Object
readonly
Returns the value of attribute project_id.
-
#project_name ⇒ Object
readonly
Returns the value of attribute project_name.
Instance Method Summary collapse
- #attributes ⇒ Object
- #build(number) ⇒ Object
- #builds ⇒ Object
-
#initialize(options = {}, client) ⇒ BuildType
constructor
A new instance of BuildType.
Constructor Details
#initialize(options = {}, client) ⇒ BuildType
Returns a new instance of BuildType.
8 9 10 11 12 13 14 15 16 |
# File 'lib/tc4r/build_type.rb', line 8 def initialize( = {},client) = Tc4r::Helpers.symbolize() @id = [:id] @name = [:name] @project_name = [:project_name] || [:project][:name] @project_id = [:project_id] || [:project][:id] @href = [:href] @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
6 7 8 |
# File 'lib/tc4r/build_type.rb', line 6 def client @client end |
#href ⇒ Object (readonly)
Returns the value of attribute href.
6 7 8 |
# File 'lib/tc4r/build_type.rb', line 6 def href @href end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/tc4r/build_type.rb', line 6 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/tc4r/build_type.rb', line 6 def name @name end |
#project_id ⇒ Object (readonly)
Returns the value of attribute project_id.
6 7 8 |
# File 'lib/tc4r/build_type.rb', line 6 def project_id @project_id end |
#project_name ⇒ Object (readonly)
Returns the value of attribute project_name.
6 7 8 |
# File 'lib/tc4r/build_type.rb', line 6 def project_name @project_name end |
Instance Method Details
#attributes ⇒ Object
18 19 20 |
# File 'lib/tc4r/build_type.rb', line 18 def attributes { :id => @id, :name => @name, :project_name => @project_name, :project_id => @project_id, :href => @href } end |
#build(number) ⇒ Object
26 27 28 |
# File 'lib/tc4r/build_type.rb', line 26 def build(number) client.build(id,number) end |
#builds ⇒ Object
22 23 24 |
# File 'lib/tc4r/build_type.rb', line 22 def builds client.query_builds(id) end |