Sha256: ce7c20250f629d5fe24c79cfebc03698def7ee8738322b6a9210f3d5259bdab1

Contents?: true

Size: 753 Bytes

Versions: 12

Compression:

Stored size: 753 Bytes

Contents

require 'bora/cfn/status'

class Bora
  module Cfn

    class Event
      def initialize(event)
        @event = event
        @status = Status.new(@event.resource_status)
      end

      def method_missing(sym, *args, &block)
        @event.send(sym, *args, &block)
      end

      def status_success?
        @status.success?
      end

      def status_failure?
        @status.failure?
      end

      def status_complete?
        status_success? || status_failure?
      end

      def to_s
        status_reason = @event.resource_status_reason ? " - #{@event.resource_status_reason}" : ""
        "#{@event.timestamp.getlocal} - #{@event.resource_type} - #{@event.logical_resource_id} - #{@status}#{status_reason}"
      end
    end

  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
bora-1.6.0 lib/bora/cfn/event.rb
bora-1.5.0 lib/bora/cfn/event.rb
bora-1.4.1 lib/bora/cfn/event.rb
bora-1.4.0 lib/bora/cfn/event.rb
bora-1.3.0 lib/bora/cfn/event.rb
bora-1.2.0 lib/bora/cfn/event.rb
bora-1.1.1 lib/bora/cfn/event.rb
bora-1.1.0 lib/bora/cfn/event.rb
bora-1.0.1 lib/bora/cfn/event.rb
bora-1.0.0 lib/bora/cfn/event.rb
bora-1.0.0.beta2 lib/bora/cfn/event.rb
bora-1.0.0.beta1 lib/bora/cfn/event.rb