Module: Hanami::Lambda::Function::ClassMethods Private

Defined in:
lib/hanami/lambda/function.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Since:

  • 0.2.0

Instance Method Summary collapse

Instance Method Details

#event_typeClass

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return the class which define the event type

Returns:

  • (Class)

    the class which define the event type

Since:

  • 0.2.0



32
33
34
# File 'lib/hanami/lambda/function.rb', line 32

def event_type
  @event_type || Event
end

#type(klass) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Define the event type

Parameters:

  • klass (Class)

    the class which define the event type

Since:

  • 0.2.0



42
43
44
# File 'lib/hanami/lambda/function.rb', line 42

def type(klass)
  @event_type = klass
end