Module: Job::States

Defined in:
lib/travis/model/job/states.rb

Instance Method Summary collapse

Instance Method Details

#failed?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/travis/model/job/states.rb', line 23

def failed?
  status == 1
end

#passed?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/travis/model/job/states.rb', line 19

def passed?
  status == 0
end

#propagate(*args) ⇒ Object



6
7
8
9
# File 'lib/travis/model/job/states.rb', line 6

def propagate(*args)
  owner.send(*args)
  true
end

#unknown?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/travis/model/job/states.rb', line 27

def unknown?
  status == nil
end

#update_attributes(attributes) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/travis/model/job/states.rb', line 11

def update_attributes(attributes)
  if content = attributes.delete(:log)
    log.update_attributes(:content => content)
  end
  update_states(attributes.deep_symbolize_keys)
  super
end