Sha256: 187e27d913de7808d20d525a364d94a8f451596168e53cfa219bc41153db8a26

Contents?: true

Size: 626 Bytes

Versions: 7

Compression:

Stored size: 626 Bytes

Contents

module Rollo
  module Model
    class ScalingActivity
      def initialize(activity)
        @activity = activity
      end

      def id
        @activity.activity_id
      end

      def start_time
        @activity.start_time
      end

      def end_time
        @activity.end_time
      end

      def started_after_completion_of?(other)
        self.id != other.id &&
            !self.start_time.nil? &&
            !other.end_time.nil? &&
            self.start_time > other.end_time
      end

      def is_complete?
        %w(Successful Failed Cancelled).include?(@activity.status_code)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rollo-0.7.0 lib/rollo/model/scaling_activity.rb
rollo-0.6.0 lib/rollo/model/scaling_activity.rb
rollo-0.5.0 lib/rollo/model/scaling_activity.rb
rollo-0.4.0 lib/rollo/model/scaling_activity.rb
rollo-0.3.0 lib/rollo/model/scaling_activity.rb
rollo-0.2.0 lib/rollo/model/scaling_activity.rb
rollo-0.1.0 lib/rollo/model/scaling_activity.rb