Class: Tinderbot::Bot
- Inherits:
-
Object
- Object
- Tinderbot::Bot
- Defined in:
- lib/tinderbot/bot.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
Instance Method Summary collapse
-
#initialize(client) ⇒ Bot
constructor
A new instance of Bot.
- #like_recommended_users ⇒ Object
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
#client ⇒ Object
Returns the value of attribute client.
3 4 5 |
# File 'lib/tinderbot/bot.rb', line 3 def client @client end |
Instance Method Details
#like_recommended_users ⇒ Object
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 |