chore: delegate to #within from Section initializer
MODIFY
lib/site_prism/section.rb
lib/site_prism/section.rb
@@ -25,10 +25,10 @@ module SitePrism
nil
end
- def initialize(parent, root_element)
+ def initialize(parent, root_element, &block)
@parent = parent
@root_element = root_element
- Capybara.within(@root_element) { yield(self) } if block_given?
+ within(&block) if block_given?
end
def within

chore: delegate to #within from Section initializer