rapid7/nexpose-client — pull request #68 by erran-r7 (2014-07-01 00:26:53+00:00)
Title: Add `Criteria#<<(criterion)` to stop repetition

>Prior to this change `Nexpose::DynamicAssetGroup#criteria` accessor was used to get the DAG's criteria, `Criteria#criteria` was then used to get the actual array following `Array#<<(criterion)` which would be used to add a new criterion. Producing the longer syntax `dag.criteria.criteria << my_new_criterion` vs. `my_dag.criteria << my_new_criterion`.

## Before
```ruby
dag = Nexpose:: DynamicAssetGroup.new('test123')
criterion = Criterion.new(Search::Field::OS, Search::Operator::CONTAINS, 'linux')
dag.criteria = Criteria.new

# We needlessly repeat criteria here
dag.criteria.criteria << criterion
```

## After
```ruby
dag = Nexpose:: DynamicAssetGroup.new('test123')
criterion = Criterion.new(Search::Field::OS, Search::Operator::CONTAINS, 'linux')
dag.criteria = Criteria.new

# This is more straight forward
dag.criteria << criterion
```