Class: Jets::Shim::Adapter::Base

Inherits:
Object
  • Object
show all
Extended by:
Memoist
Includes:
Util::Logging
Defined in:
lib/jets/shim/adapter/base.rb

Direct Known Subclasses

Command, Event, Fallback, Prewarm, Web

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Util::Logging

#log

Constructor Details

#initialize(event, context = nil, target = nil) ⇒ Base

Returns a new instance of Base.



10
11
12
13
14
# File 'lib/jets/shim/adapter/base.rb', line 10

def initialize(event, context = nil, target = nil)
  @event = ActiveSupport::HashWithIndifferentAccess.new(event)
  @context = context
  @target = target # IE: cool_event.party
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



9
10
11
# File 'lib/jets/shim/adapter/base.rb', line 9

def context
  @context
end

#eventObject (readonly)

Returns the value of attribute event.



9
10
11
# File 'lib/jets/shim/adapter/base.rb', line 9

def event
  @event
end

#targetObject (readonly)

Returns the value of attribute target.



9
10
11
# File 'lib/jets/shim/adapter/base.rb', line 9

def target
  @target
end