Class: SlackInvitation::Invitator
- Inherits:
-
Object
- Object
- SlackInvitation::Invitator
- Includes:
- Singleton
- Defined in:
- lib/slack_invitation/invitator.rb
Instance Attribute Summary collapse
-
#admin_email ⇒ Object
writeonly
Sets the attribute admin_email.
-
#admin_password ⇒ Object
writeonly
Sets the attribute admin_password.
-
#team ⇒ Object
writeonly
Sets the attribute team.
Instance Method Summary collapse
- #config(team, email, password) ⇒ Object
-
#initialize ⇒ Invitator
constructor
A new instance of Invitator.
- #invite(email) ⇒ Object
- #quit ⇒ Object
Constructor Details
#initialize ⇒ Invitator
10 11 12 13 14 |
# File 'lib/slack_invitation/invitator.rb', line 10 def initialize @driver = Selenium::WebDriver.for :firefox target_size = Selenium::WebDriver::Dimension.new(1024, 768) @driver.manage.window.size = target_size end |
Instance Attribute Details
#admin_email=(value) ⇒ Object (writeonly)
Sets the attribute admin_email
8 9 10 |
# File 'lib/slack_invitation/invitator.rb', line 8 def admin_email=(value) @admin_email = value end |
#admin_password=(value) ⇒ Object (writeonly)
Sets the attribute admin_password
8 9 10 |
# File 'lib/slack_invitation/invitator.rb', line 8 def admin_password=(value) @admin_password = value end |
#team=(value) ⇒ Object (writeonly)
Sets the attribute team
8 9 10 |
# File 'lib/slack_invitation/invitator.rb', line 8 def team=(value) @team = value end |
Instance Method Details
#config(team, email, password) ⇒ Object
26 27 28 29 30 |
# File 'lib/slack_invitation/invitator.rb', line 26 def config(team, email, password) @team = team @admin_email = email @admin_password = password end |
#invite(email) ⇒ Object
20 21 22 23 24 |
# File 'lib/slack_invitation/invitator.rb', line 20 def invite(email) login send_invitation_mail(email) test_success end |
#quit ⇒ Object
16 17 18 |
# File 'lib/slack_invitation/invitator.rb', line 16 def quit @driver.quit end |