Class: EurekaBot::Tg::Controller::Response

Inherits:
Controller::Response
  • Object
show all
Defined in:
lib/eureka_bot/tg/controller/response.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.sender_classObject



14
15
16
# File 'lib/eureka_bot/tg/controller/response.rb', line 14

def self.sender_class
  @@sender_class ||= EurekaBot::Tg::Sender
end

Instance Method Details

#consumeObject



5
6
7
8
9
10
11
12
# File 'lib/eureka_bot/tg/controller/response.rb', line 5

def consume
  while element = @data.shift
    EurekaBot::Job::Output.perform_later(
        self.class.sender_class.to_s,
        element
    )
  end
end