Class: PuppetX::Puppetlabs::Migration::OverviewModel::Query::ScalarValue
- Inherits:
-
RelationalStep
- Object
- RelationalStep
- PuppetX::Puppetlabs::Migration::OverviewModel::Query::ScalarValue
- Defined in:
- lib/puppet_x/puppetlabs/migration/overview_model/query.rb
Overview
Returns the first element of a collection
Instance Method Summary collapse
-
#evaluate(collection) ⇒ Entity?
The entity or nil.
Instance Method Details
#evaluate(collection) ⇒ Entity?
Returns The entity or nil.
20 21 22 |
# File 'lib/puppet_x/puppetlabs/migration/overview_model/query.rb', line 20 def evaluate(collection) collection.is_a?(Array) ? collection.first : nil end |