Class: Jasmine::Headless::UniqueAssetList
- Inherits:
-
Array
- Object
- Array
- Jasmine::Headless::UniqueAssetList
- Defined in:
- lib/jasmine/headless/unique_asset_list.rb
Instance Method Summary collapse
Instance Method Details
#<<(asset) ⇒ Object
3 4 5 6 7 |
# File 'lib/jasmine/headless/unique_asset_list.rb', line 3 def <<(asset) raise InvalidUniqueAsset.new("Not an asset: #{asset.inspect}") if !asset.respond_to?(:logical_path) super if !self.any? { |other| asset.logical_path == other.logical_path } end |
#flatten ⇒ Object
9 10 11 |
# File 'lib/jasmine/headless/unique_asset_list.rb', line 9 def flatten self.collect(&:to_a).flatten end |