natritmeyer/site_prism — pull request #56 by bassneck (2014-01-01 06:58:22+00:00)
Title: Anonymous sections

Rather often, I find myself in need of a namespace for elements - something that quacks like a section, but doesn't require an explicit class declaration. Anonymous sections to the rescue!

```ruby
class HomePage < SitePrism::Page
section :header, '.header' do |s|
s.element :title, 'h1'
end
end
```

The same thing works with the `sections` method.

```ruby
class HomePage < SitePrism::Page
sections :articles, '.article' do |s|
s.element :title, 'h2'
s.element :content, '.content'
end
end
```