Sha256: 5feb82a44414f24a6e942e25a75aec67693cdb220984952cb78276c019b0612d

Contents?: true

Size: 636 Bytes

Versions: 2

Compression:

Stored size: 636 Bytes

Contents

module Awspec::Type
  class Lambda < Base
    attr_reader :function

    def initialize(id)
      super
      @function = find_lambda(id)
      @id = @function[:function_arn] if @function
    end

    def method_missing(name)
      describe = name.to_sym
      if @function.members.include?(describe)
        @function[describe]
      else
        super
      end
    end

    def timeout
      @function[:timeout]
    end

    def has_event_source?(event_source_arn)
      sources = select_event_source_by_function_arn(@id)
      sources.find do |source|
        source.event_source_arn == event_source_arn
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
awspec-0.8.0 lib/awspec/type/lambda.rb
awspec-0.7.0 lib/awspec/type/lambda.rb