--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns a collection reference by finding it through a CSS <tt>pattern</tt> in the DOM. This collection can then be used for further method calls. Examples:"
- !ruby/struct:SM::Flow::VERB 
  body: "  page.select('p')                      # =&gt; $$('p');\n  page.select('p.welcome b').first      # =&gt; $$('p.welcome b').first();\n  page.select('p.welcome b').first.hide # =&gt; $$('p.welcome b').first().hide();\n"
- !ruby/struct:SM::Flow::P 
  body: "You can also use prototype enumerations with the collection. Observe:"
- !ruby/struct:SM::Flow::VERB 
  body: "  # Generates: $$('#items li').each(function(value) { value.hide(); });\n  page.select('#items li').each do |value|\n    value.hide\n  end\n"
- !ruby/struct:SM::Flow::P 
  body: "Though you can call the block param anything you want, they are always rendered in the javascript as 'value, index.' Other enumerations, like collect() return the last statement:"
- !ruby/struct:SM::Flow::VERB 
  body: "  # Generates: var hidden = $$('#items li').collect(function(value, index) { return value.hide(); });\n  page.select('#items li').collect('hidden') do |item|\n    item.hide\n  end\n"
full_name: ActionView::Helpers::PrototypeHelper::JavaScriptGenerator::GeneratorMethods#select
is_singleton: false
name: select
params: (pattern)
visibility: public
