Class: BuildBuddy::BuildData
- Inherits:
- 
      Object
      
        - Object
- BuildBuddy::BuildData
 
- Defined in:
- lib/build_buddy/build_data.rb
Instance Attribute Summary collapse
- 
  
    
      #_id  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Mongo ID. 
- 
  
    
      #build_log_filename  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute build_log_filename. 
- 
  
    
      #build_type  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    one of :master, :release or :pull_request. 
- 
  
    
      #build_version  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute build_version. 
- 
  
    
      #end_time  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute end_time. 
- 
  
    
      #exit_code  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute exit_code. 
- 
  
    
      #pull_request  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute pull_request. 
- 
  
    
      #repo_full_name  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute repo_full_name. 
- 
  
    
      #repo_sha  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute repo_sha. 
- 
  
    
      #start_time  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute start_time. 
- 
  
    
      #termination_type  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    :killed or :exited. 
Instance Method Summary collapse
- 
  
    
      #initialize(args)  ⇒ BuildData 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of BuildData. 
- #to_h ⇒ Object
Constructor Details
#initialize(args) ⇒ BuildData
Returns a new instance of BuildData.
| 16 17 18 19 20 21 22 23 24 | # File 'lib/build_buddy/build_data.rb', line 16 def initialize(args) args.each do |key, value| setter = self.method((key.to_s + '=').to_sym) unless setter.nil? setter.call(value) end end end | 
Instance Attribute Details
#_id ⇒ Object
Mongo ID
| 3 4 5 | # File 'lib/build_buddy/build_data.rb', line 3 def _id @_id end | 
#build_log_filename ⇒ Object
Returns the value of attribute build_log_filename.
| 14 15 16 | # File 'lib/build_buddy/build_data.rb', line 14 def build_log_filename @build_log_filename end | 
#build_type ⇒ Object
one of :master, :release or :pull_request
| 4 5 6 | # File 'lib/build_buddy/build_data.rb', line 4 def build_type @build_type end | 
#build_version ⇒ Object
Returns the value of attribute build_version.
| 6 7 8 | # File 'lib/build_buddy/build_data.rb', line 6 def build_version @build_version end | 
#end_time ⇒ Object
Returns the value of attribute end_time.
| 13 14 15 | # File 'lib/build_buddy/build_data.rb', line 13 def end_time @end_time end | 
#exit_code ⇒ Object
Returns the value of attribute exit_code.
| 11 12 13 | # File 'lib/build_buddy/build_data.rb', line 11 def exit_code @exit_code end | 
#pull_request ⇒ Object
Returns the value of attribute pull_request.
| 7 8 9 | # File 'lib/build_buddy/build_data.rb', line 7 def pull_request @pull_request end | 
#repo_full_name ⇒ Object
Returns the value of attribute repo_full_name.
| 5 6 7 | # File 'lib/build_buddy/build_data.rb', line 5 def repo_full_name @repo_full_name end | 
#repo_sha ⇒ Object
Returns the value of attribute repo_sha.
| 9 10 11 | # File 'lib/build_buddy/build_data.rb', line 9 def repo_sha @repo_sha end | 
#start_time ⇒ Object
Returns the value of attribute start_time.
| 12 13 14 | # File 'lib/build_buddy/build_data.rb', line 12 def start_time @start_time end | 
#termination_type ⇒ Object
:killed or :exited
| 10 11 12 | # File 'lib/build_buddy/build_data.rb', line 10 def termination_type @termination_type end | 
Instance Method Details
#to_h ⇒ Object
| 26 27 28 29 30 | # File 'lib/build_buddy/build_data.rb', line 26 def to_h hash = {} instance_variables.each {|var| hash[var.to_s.delete("@")] = instance_variable_get(var) } hash end |