Class: Workarea::Lint::SkusMissingVariants
- Inherits:
-
Workarea::Lint
- Object
- Workarea::Lint
- Workarea::Lint::SkusMissingVariants
- Defined in:
- lib/workarea/lint/skus_missing_variants.rb
Instance Attribute Summary
Attributes inherited from Workarea::Lint
Instance Method Summary collapse
Methods inherited from Workarea::Lint
#catalog_skus, #error, #initialize, #inventory_skus, lint_classes, lints_paths, load_lint_classes, #pricing_skus, run, #warn
Constructor Details
This class inherits a constructor from Workarea::Lint
Instance Method Details
#all_skus ⇒ Object
12 13 14 |
# File 'lib/workarea/lint/skus_missing_variants.rb', line 12 def all_skus (pricing_skus + inventory_skus).uniq end |
#run ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/workarea/lint/skus_missing_variants.rb', line 4 def run all_skus.each do |sku| unless catalog_skus.include?(sku) error("#{sku},Missing Catalog::Variant") end end end |