Class: Tinybucket::Model::BuildStatus

Inherits:
Base
  • Object
show all
Includes:
Concerns::Reloadable, Concerns::RepositoryKeys
Defined in:
lib/tinybucket/model/build_status.rb

Overview

Build Status

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#attributes, #attributes=, concern_included?, #initialize

Constructor Details

This class inherits a constructor from Tinybucket::Model::Base

Instance Attribute Details

#descriptionString

Returns:

  • (String)


24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/tinybucket/model/build_status.rb', line 24

class BuildStatus < Base
  include Tinybucket::Model::Concerns::RepositoryKeys
  include Tinybucket::Model::Concerns::Reloadable

  acceptable_attributes \
    :state, :type, :key, :name, :url, :description, :links, \
    :created_on, :updated_on

  attr_accessor :revision

  # Update build status
  #
  # @param options [Hash]
  # @option options [String] :state
  # @return [Tinybucket::Model::BuildStatus]
  def update(options)
    build_status_api.put(revision, key, options).tap do |m|
      m.repo_keys = repo_keys
      m.revision = revision
    end
  end

  private

  def build_status_api
    create_api('BuildStatus', repo_keys)
  end

  def load_model
    build_status_api.find(revision, key)
  end
end

#keyString

Returns:

  • (String)


24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/tinybucket/model/build_status.rb', line 24

class BuildStatus < Base
  include Tinybucket::Model::Concerns::RepositoryKeys
  include Tinybucket::Model::Concerns::Reloadable

  acceptable_attributes \
    :state, :type, :key, :name, :url, :description, :links, \
    :created_on, :updated_on

  attr_accessor :revision

  # Update build status
  #
  # @param options [Hash]
  # @option options [String] :state
  # @return [Tinybucket::Model::BuildStatus]
  def update(options)
    build_status_api.put(revision, key, options).tap do |m|
      m.repo_keys = repo_keys
      m.revision = revision
    end
  end

  private

  def build_status_api
    create_api('BuildStatus', repo_keys)
  end

  def load_model
    build_status_api.find(revision, key)
  end
end

Returns:

  • (Hash)


24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/tinybucket/model/build_status.rb', line 24

class BuildStatus < Base
  include Tinybucket::Model::Concerns::RepositoryKeys
  include Tinybucket::Model::Concerns::Reloadable

  acceptable_attributes \
    :state, :type, :key, :name, :url, :description, :links, \
    :created_on, :updated_on

  attr_accessor :revision

  # Update build status
  #
  # @param options [Hash]
  # @option options [String] :state
  # @return [Tinybucket::Model::BuildStatus]
  def update(options)
    build_status_api.put(revision, key, options).tap do |m|
      m.repo_keys = repo_keys
      m.revision = revision
    end
  end

  private

  def build_status_api
    create_api('BuildStatus', repo_keys)
  end

  def load_model
    build_status_api.find(revision, key)
  end
end

#nameString

Returns:

  • (String)


24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/tinybucket/model/build_status.rb', line 24

class BuildStatus < Base
  include Tinybucket::Model::Concerns::RepositoryKeys
  include Tinybucket::Model::Concerns::Reloadable

  acceptable_attributes \
    :state, :type, :key, :name, :url, :description, :links, \
    :created_on, :updated_on

  attr_accessor :revision

  # Update build status
  #
  # @param options [Hash]
  # @option options [String] :state
  # @return [Tinybucket::Model::BuildStatus]
  def update(options)
    build_status_api.put(revision, key, options).tap do |m|
      m.repo_keys = repo_keys
      m.revision = revision
    end
  end

  private

  def build_status_api
    create_api('BuildStatus', repo_keys)
  end

  def load_model
    build_status_api.find(revision, key)
  end
end

#revisionObject

Returns the value of attribute revision.



32
33
34
# File 'lib/tinybucket/model/build_status.rb', line 32

def revision
  @revision
end

#stateString

Returns:

  • (String)


24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/tinybucket/model/build_status.rb', line 24

class BuildStatus < Base
  include Tinybucket::Model::Concerns::RepositoryKeys
  include Tinybucket::Model::Concerns::Reloadable

  acceptable_attributes \
    :state, :type, :key, :name, :url, :description, :links, \
    :created_on, :updated_on

  attr_accessor :revision

  # Update build status
  #
  # @param options [Hash]
  # @option options [String] :state
  # @return [Tinybucket::Model::BuildStatus]
  def update(options)
    build_status_api.put(revision, key, options).tap do |m|
      m.repo_keys = repo_keys
      m.revision = revision
    end
  end

  private

  def build_status_api
    create_api('BuildStatus', repo_keys)
  end

  def load_model
    build_status_api.find(revision, key)
  end
end

#typeString

Returns:

  • (String)


24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/tinybucket/model/build_status.rb', line 24

class BuildStatus < Base
  include Tinybucket::Model::Concerns::RepositoryKeys
  include Tinybucket::Model::Concerns::Reloadable

  acceptable_attributes \
    :state, :type, :key, :name, :url, :description, :links, \
    :created_on, :updated_on

  attr_accessor :revision

  # Update build status
  #
  # @param options [Hash]
  # @option options [String] :state
  # @return [Tinybucket::Model::BuildStatus]
  def update(options)
    build_status_api.put(revision, key, options).tap do |m|
      m.repo_keys = repo_keys
      m.revision = revision
    end
  end

  private

  def build_status_api
    create_api('BuildStatus', repo_keys)
  end

  def load_model
    build_status_api.find(revision, key)
  end
end

#urlString

Returns:

  • (String)


24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/tinybucket/model/build_status.rb', line 24

class BuildStatus < Base
  include Tinybucket::Model::Concerns::RepositoryKeys
  include Tinybucket::Model::Concerns::Reloadable

  acceptable_attributes \
    :state, :type, :key, :name, :url, :description, :links, \
    :created_on, :updated_on

  attr_accessor :revision

  # Update build status
  #
  # @param options [Hash]
  # @option options [String] :state
  # @return [Tinybucket::Model::BuildStatus]
  def update(options)
    build_status_api.put(revision, key, options).tap do |m|
      m.repo_keys = repo_keys
      m.revision = revision
    end
  end

  private

  def build_status_api
    create_api('BuildStatus', repo_keys)
  end

  def load_model
    build_status_api.find(revision, key)
  end
end

Instance Method Details

#update(options) ⇒ Tinybucket::Model::BuildStatus

Update build status

Parameters:

  • options (Hash)

Options Hash (options):

  • :state (String)

Returns:



39
40
41
42
43
44
# File 'lib/tinybucket/model/build_status.rb', line 39

def update(options)
  build_status_api.put(revision, key, options).tap do |m|
    m.repo_keys = repo_keys
    m.revision = revision
  end
end