mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
17 lines
No EOL
373 B
Ruby
17 lines
No EOL
373 B
Ruby
def init
|
|
super
|
|
sections.place(:builtins).before(:subclasses)
|
|
end
|
|
|
|
def builtins
|
|
return if object.path != "Capybara::Selector" # only show built-in selectors for Selector class
|
|
|
|
@selectors = Registry.all(:selector)
|
|
return if @selectors.nil? || @selectors.empty?
|
|
|
|
@selectors = @selectors.map do |selector|
|
|
[selector.name, selector]
|
|
end
|
|
|
|
erb(:selectors)
|
|
end |