Class: Moby::Configuration
- Inherits:
-
Object
- Object
- Moby::Configuration
- Defined in:
- lib/Moby/Configuration.rb
Constant Summary collapse
- AVAILABLE_USER_AGENTS =
(Mechanize::AGENT_ALIASES.keys - ['Mechanize']).freeze
Instance Attribute Summary collapse
-
#backend ⇒ Object
Returns the value of attribute backend.
-
#browser ⇒ Object
Returns the value of attribute browser.
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#delay ⇒ Object
Returns the value of attribute delay.
-
#form_name ⇒ Object
Returns the value of attribute form_name.
-
#form_number ⇒ Object
Returns the value of attribute form_number.
-
#iterations ⇒ Object
Returns the value of attribute iterations.
-
#password_field_name ⇒ Object
Returns the value of attribute password_field_name.
-
#password_field_number ⇒ Object
Returns the value of attribute password_field_number.
-
#url ⇒ Object
Returns the value of attribute url.
-
#username_field_name ⇒ Object
Returns the value of attribute username_field_name.
-
#username_field_number ⇒ Object
Returns the value of attribute username_field_number.
-
#username_hostname ⇒ Object
Returns the value of attribute username_hostname.
-
#username_is_email_address ⇒ Object
Returns the value of attribute username_is_email_address.
-
#username_prefilled ⇒ Object
Returns the value of attribute username_prefilled.
-
#verbose ⇒ Object
Returns the value of attribute verbose.
-
#word_list_path ⇒ Object
Returns the value of attribute word_list_path.
Instance Method Summary collapse
- #debug? ⇒ Boolean
- #fixed_number_of_submissions? ⇒ Boolean
- #mechanize? ⇒ Boolean
- #selenium? ⇒ Boolean
- #user_agent ⇒ Object
- #username_is_email_address? ⇒ Boolean
- #username_prefilled? ⇒ Boolean
- #using_form_name? ⇒ Boolean
- #using_password_field_name? ⇒ Boolean
- #using_username_field_name? ⇒ Boolean
- #verbose? ⇒ Boolean
Instance Attribute Details
#backend ⇒ Object
Returns the value of attribute backend.
10 11 12 |
# File 'lib/Moby/Configuration.rb', line 10 def backend @backend end |
#browser ⇒ Object
Returns the value of attribute browser.
10 11 12 |
# File 'lib/Moby/Configuration.rb', line 10 def browser @browser end |
#debug ⇒ Object
Returns the value of attribute debug.
10 11 12 |
# File 'lib/Moby/Configuration.rb', line 10 def debug @debug end |
#delay ⇒ Object
Returns the value of attribute delay.
10 11 12 |
# File 'lib/Moby/Configuration.rb', line 10 def delay @delay end |
#form_name ⇒ Object
Returns the value of attribute form_name.
10 11 12 |
# File 'lib/Moby/Configuration.rb', line 10 def form_name @form_name end |
#form_number ⇒ Object
Returns the value of attribute form_number.
10 11 12 |
# File 'lib/Moby/Configuration.rb', line 10 def form_number @form_number end |
#iterations ⇒ Object
Returns the value of attribute iterations.
10 11 12 |
# File 'lib/Moby/Configuration.rb', line 10 def iterations @iterations end |
#password_field_name ⇒ Object
Returns the value of attribute password_field_name.
10 11 12 |
# File 'lib/Moby/Configuration.rb', line 10 def password_field_name @password_field_name end |
#password_field_number ⇒ Object
Returns the value of attribute password_field_number.
10 11 12 |
# File 'lib/Moby/Configuration.rb', line 10 def password_field_number @password_field_number end |
#url ⇒ Object
Returns the value of attribute url.
10 11 12 |
# File 'lib/Moby/Configuration.rb', line 10 def url @url end |
#username_field_name ⇒ Object
Returns the value of attribute username_field_name.
10 11 12 |
# File 'lib/Moby/Configuration.rb', line 10 def username_field_name @username_field_name end |
#username_field_number ⇒ Object
Returns the value of attribute username_field_number.
10 11 12 |
# File 'lib/Moby/Configuration.rb', line 10 def username_field_number @username_field_number end |
#username_hostname ⇒ Object
Returns the value of attribute username_hostname.
10 11 12 |
# File 'lib/Moby/Configuration.rb', line 10 def username_hostname @username_hostname end |
#username_is_email_address ⇒ Object
Returns the value of attribute username_is_email_address.
10 11 12 |
# File 'lib/Moby/Configuration.rb', line 10 def username_is_email_address @username_is_email_address end |
#username_prefilled ⇒ Object
Returns the value of attribute username_prefilled.
10 11 12 |
# File 'lib/Moby/Configuration.rb', line 10 def username_prefilled @username_prefilled end |
#verbose ⇒ Object
Returns the value of attribute verbose.
10 11 12 |
# File 'lib/Moby/Configuration.rb', line 10 def verbose @verbose end |
#word_list_path ⇒ Object
Returns the value of attribute word_list_path.
10 11 12 |
# File 'lib/Moby/Configuration.rb', line 10 def word_list_path @word_list_path end |
Instance Method Details
#debug? ⇒ Boolean
66 67 68 |
# File 'lib/Moby/Configuration.rb', line 66 def debug? @debug end |
#fixed_number_of_submissions? ⇒ Boolean
74 75 76 |
# File 'lib/Moby/Configuration.rb', line 74 def fixed_number_of_submissions? !!@iterations end |
#mechanize? ⇒ Boolean
50 51 52 |
# File 'lib/Moby/Configuration.rb', line 50 def mechanize? @backend == :mechanize end |
#selenium? ⇒ Boolean
54 55 56 |
# File 'lib/Moby/Configuration.rb', line 54 def selenium? @backend == :selenium end |
#user_agent ⇒ Object
34 35 36 |
# File 'lib/Moby/Configuration.rb', line 34 def user_agent @user_agent || random_user_agent end |
#username_is_email_address? ⇒ Boolean
58 59 60 |
# File 'lib/Moby/Configuration.rb', line 58 def username_is_email_address? @username_is_email_address || @username_hostname || @username_field_name == 'email' end |
#username_prefilled? ⇒ Boolean
62 63 64 |
# File 'lib/Moby/Configuration.rb', line 62 def username_prefilled? @username_prefilled end |
#using_form_name? ⇒ Boolean
38 39 40 |
# File 'lib/Moby/Configuration.rb', line 38 def using_form_name? !@form_name.nil? end |
#using_password_field_name? ⇒ Boolean
46 47 48 |
# File 'lib/Moby/Configuration.rb', line 46 def using_password_field_name? !@password_field_name.nil? end |
#using_username_field_name? ⇒ Boolean
42 43 44 |
# File 'lib/Moby/Configuration.rb', line 42 def using_username_field_name? !@username_field_name.nil? end |
#verbose? ⇒ Boolean
70 71 72 |
# File 'lib/Moby/Configuration.rb', line 70 def verbose? @verbose end |