Class: Tinderbot::Bot

Inherits:
Object
  • Object
show all
Defined in:
lib/tinderbot/bot.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Bot

Returns a new instance of Bot.



5
6
7
# File 'lib/tinderbot/bot.rb', line 5

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientObject

Returns the value of attribute client.



3
4
5
# File 'lib/tinderbot/bot.rb', line 3

def client
  @client
end

Instance Method Details



9
10
11
12
13
14
15
# File 'lib/tinderbot/bot.rb', line 9

def like_recommended_users
  recommended_users = @client.recommended_users
  until recommended_users.empty?
    recommended_users.each { |user| @client.like user }
    recommended_users = @client.recommended_users
  end
end