Exception: Ferrum::NodeMovingError

Inherits:
Error
  • Object
show all
Defined in:
lib/ferrum/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(node, prev, current) ⇒ NodeMovingError

Returns a new instance of NodeMovingError.



61
62
63
64
65
66
# File 'lib/ferrum/errors.rb', line 61

def initialize(node, prev, current)
  @node = node
  @prev = prev
  @current = current
  super(message)
end

Instance Method Details

#messageObject



68
69
70
71
72
# File 'lib/ferrum/errors.rb', line 68

def message
  "#{@node.inspect} that you're trying to click is moving, hence " \
    "we cannot. Previously it was at #{@prev.inspect} but now at " \
    "#{@current.inspect}."
end