Class: SlackBot::Events::Middleware::Entry

Inherits:
Object
  • Object
show all
Defined in:
lib/slack_bot/events/middleware/chain.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(klass, args = []) ⇒ Entry

Returns a new instance of Entry.



142
143
144
145
# File 'lib/slack_bot/events/middleware/chain.rb', line 142

def initialize(klass, args = [])
  @klass = klass
  @args = args
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



140
141
142
# File 'lib/slack_bot/events/middleware/chain.rb', line 140

def args
  @args
end

#klassObject (readonly)

Returns the value of attribute klass.



139
140
141
# File 'lib/slack_bot/events/middleware/chain.rb', line 139

def klass
  @klass
end

Instance Method Details

#instance!Object



147
148
149
# File 'lib/slack_bot/events/middleware/chain.rb', line 147

def instance!
  klass.new(*args)
end