Sha256: 85490c72d9270bdbfe0151d17b8000e46bd5d7321150627ea5dca43ad09ad251

Contents?: true

Size: 633 Bytes

Versions: 17

Compression:

Stored size: 633 Bytes

Contents

# frozen_string_literal: true

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)
        id != other.id &&
          !start_time.nil? &&
          !other.end_time.nil? &&
          start_time > other.end_time
      end

      def complete?
        %w[Successful Failed Cancelled].include?(@activity.status_code)
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
rollo-0.9.0.pre.7 lib/rollo/model/scaling_activity.rb
rollo-0.9.0.pre.6 lib/rollo/model/scaling_activity.rb
rollo-0.9.0.pre.5 lib/rollo/model/scaling_activity.rb
rollo-0.9.0.pre.4 lib/rollo/model/scaling_activity.rb
rollo-0.9.0.pre.3 lib/rollo/model/scaling_activity.rb
rollo-0.9.0.pre.2 lib/rollo/model/scaling_activity.rb
rollo-0.9.0.pre.1 lib/rollo/model/scaling_activity.rb
rollo-0.8.0 lib/rollo/model/scaling_activity.rb
rollo-0.8.0.pre.9 lib/rollo/model/scaling_activity.rb
rollo-0.8.0.pre.8 lib/rollo/model/scaling_activity.rb
rollo-0.8.0.pre.7 lib/rollo/model/scaling_activity.rb
rollo-0.8.0.pre.6 lib/rollo/model/scaling_activity.rb
rollo-0.8.0.pre.5 lib/rollo/model/scaling_activity.rb
rollo-0.8.0.pre.4 lib/rollo/model/scaling_activity.rb
rollo-0.8.0.pre.3 lib/rollo/model/scaling_activity.rb
rollo-0.8.0.pre.2 lib/rollo/model/scaling_activity.rb
rollo-0.8.0.pre.1 lib/rollo/model/scaling_activity.rb