Exception: Effigy::ElementNotFound
- Defined in:
- lib/effigy/errors.rb
Overview
Raised when attempting to select an element that isn’t on the source template.
Instance Attribute Summary collapse
-
#selector ⇒ Object
- String
-
The selector that didn’t match any elements.
Instance Method Summary collapse
-
#initialize(selector) ⇒ ElementNotFound
constructor
A new instance of ElementNotFound.
-
#message ⇒ String
A description of the failed search.
Constructor Details
#initialize(selector) ⇒ ElementNotFound
Returns a new instance of ElementNotFound.
9 10 11 |
# File 'lib/effigy/errors.rb', line 9 def initialize(selector) @selector = selector end |
Instance Attribute Details
#selector ⇒ Object
- String
-
The selector that didn’t match any elements
6 7 8 |
# File 'lib/effigy/errors.rb', line 6 def selector @selector end |
Instance Method Details
#message ⇒ String
Returns a description of the failed search.
14 15 16 |
# File 'lib/effigy/errors.rb', line 14 def "No element matched the given selector: #{selector.inspect}" end |