Class: MechanizeElement
- Inherits:
-
Object
- Object
- MechanizeElement
- Defined in:
- lib/web_minion/bots/elements/mechanize_element.rb
Direct Known Subclasses
Defined Under Namespace
Classes: InvalidTargetType
Instance Attribute Summary collapse
-
#bot ⇒ Object
readonly
Returns the value of attribute bot.
-
#element ⇒ Object
readonly
Returns the value of attribute element.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
-
#target_type ⇒ Object
readonly
Returns the value of attribute target_type.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(bot, target, value = nil, element = nil) ⇒ MechanizeElement
constructor
A new instance of MechanizeElement.
Constructor Details
#initialize(bot, target, value = nil, element = nil) ⇒ MechanizeElement
Returns a new instance of MechanizeElement.
6 7 8 9 10 11 12 |
# File 'lib/web_minion/bots/elements/mechanize_element.rb', line 6 def initialize(bot, target, value = nil, element = nil) @bot = bot @target = target @target_type = determine_target_type(target) @value = value @element = element end |
Instance Attribute Details
#bot ⇒ Object (readonly)
Returns the value of attribute bot.
4 5 6 |
# File 'lib/web_minion/bots/elements/mechanize_element.rb', line 4 def bot @bot end |
#element ⇒ Object (readonly)
Returns the value of attribute element.
4 5 6 |
# File 'lib/web_minion/bots/elements/mechanize_element.rb', line 4 def element @element end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
4 5 6 |
# File 'lib/web_minion/bots/elements/mechanize_element.rb', line 4 def target @target end |
#target_type ⇒ Object (readonly)
Returns the value of attribute target_type.
4 5 6 |
# File 'lib/web_minion/bots/elements/mechanize_element.rb', line 4 def target_type @target_type end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
4 5 6 |
# File 'lib/web_minion/bots/elements/mechanize_element.rb', line 4 def value @value end |