Class: WebMinion::Bot
- Inherits:
-
Object
- Object
- WebMinion::Bot
- Defined in:
- lib/web_minion/bots/bot.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#bot ⇒ Object
Returns the value of attribute bot.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #execute_step(method, target, value = nil, element = nil, values_hash = {}) ⇒ Object
-
#initialize(config = {}) ⇒ Bot
constructor
A new instance of Bot.
Constructor Details
#initialize(config = {}) ⇒ Bot
Returns a new instance of Bot.
6 7 8 |
# File 'lib/web_minion/bots/bot.rb', line 6 def initialize(config = {}) @config = config end |
Instance Attribute Details
#bot ⇒ Object
Returns the value of attribute bot.
4 5 6 |
# File 'lib/web_minion/bots/bot.rb', line 4 def bot @bot end |
#config ⇒ Object (readonly)
Returns the value of attribute config.
3 4 5 |
# File 'lib/web_minion/bots/bot.rb', line 3 def config @config end |
Instance Method Details
#execute_step(method, target, value = nil, element = nil, values_hash = {}) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/web_minion/bots/bot.rb', line 10 def execute_step(method, target, value = nil, element = nil, values_hash = {}) if method == :save_value method(method).call(target, value, element, values_hash) else method(method).call(target, value, element) end end |