def fulfill(value = nil)
      raise CannotTransitionError if rejected?
      return if fulfilled?
      unless resolved?
        self.value = value
        resolve_to(:fulfilled)
      end
      self
    end
def fulfill(value = nil)
      raise CannotTransitionError if rejected?
      return if fulfilled?
      unless resolved?
        self.value = value
        resolve_to(:fulfilled)
      end
      self
    end
Fulfill this promise with an optional value. The value will be stored in
 the deferred and passed along to any registered `done` callbacks.

 When fulfilling a deferred twice, nothing happens.

 @raise [CannotTransitionError] when it was already fulfilled.
 @return [Deferred] self