Exception: Crabfarm::Dsl::Surfer::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/crabfarm/dsl/surfer.rb

Direct Known Subclasses

EmptySetError, WebdriverError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(_message, _ctx) ⇒ Error

Returns a new instance of Error.



11
12
13
14
15
# File 'lib/crabfarm/dsl/surfer.rb', line 11

def initialize(_message, _ctx)
  super _message
  @ctx = _ctx
  @source = _ctx.root.page_source rescue nil # cache page source for future reference
end

Instance Attribute Details

#sourceObject (readonly)

Returns the value of attribute source.



9
10
11
# File 'lib/crabfarm/dsl/surfer.rb', line 9

def source
  @source
end