Skip to content

Commit

Permalink
Adding helpers for checking the state of the job on a notification.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Sutton committed Apr 14, 2009
1 parent a313b35 commit 063609f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lib/flix_cloud/notification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,16 @@ def initialize(attrs={})
super(attrs)
end

end
def successful?
state == 'successful_job'
end

def failed?
state == 'failed_job'
end

def cancelled?
state == 'cancelled_job'
end

end
1 change: 1 addition & 0 deletions lib/flix_cloud/record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def #{attribute}=(value)
}
end


protected

def post(path, body)
Expand Down

0 comments on commit 063609f

Please sign in to comment.