Class: DataMaps::When::Empty
- Inherits:
-
Base
- Object
- Executable
- Base
- DataMaps::When::Empty
- Defined in:
- lib/data_maps/when/empty.rb
Overview
Condition to check for empty data
Instance Attribute Summary
Attributes inherited from Executable
Instance Method Summary collapse
-
#execute(data) ⇒ Object
Check if data is empty? and return true if this equals the option.
Methods inherited from Executable
#initialize, valid_collection?
Constructor Details
This class inherits a constructor from DataMaps::Executable
Instance Method Details
#execute(data) ⇒ Object
Check if data is empty? and return true if this equals the option
10 11 12 13 |
# File 'lib/data_maps/when/empty.rb', line 10 def execute(data) return option unless data.present? data.empty? == option end |