Class: Emojidex::Util::CollectionChecker
- Inherits:
-
Object
- Object
- Emojidex::Util::CollectionChecker
- Defined in:
- lib/emojidex/util/collection_checker.rb
Overview
Check collections for presence of image assets and discrepencies in emoji indexes.
Instance Attribute Summary collapse
-
#asset_only ⇒ Object
readonly
Returns the value of attribute asset_only.
-
#index_only ⇒ Object
readonly
Returns the value of attribute index_only.
Instance Method Summary collapse
-
#initialize(collections, options = {}) ⇒ CollectionChecker
constructor
A new instance of CollectionChecker.
Constructor Details
#initialize(collections, options = {}) ⇒ CollectionChecker
Returns a new instance of CollectionChecker.
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/emojidex/util/collection_checker.rb', line 10 def initialize(collections, = {}) collections = *collections @index_only = {} @asset_only = {} asset_path = [:asset_path] || collections.first.source_path sizes = [:sizes] || Emojidex::Defaults.sizes.keys formats = [:formats] || Emojidex::Defaults.formats asset_files = create_asset_file_list(asset_path, sizes, formats) check_for_index_only(collections, asset_files, sizes, formats) check_for_asset_only(collections, asset_files) end |
Instance Attribute Details
#asset_only ⇒ Object (readonly)
Returns the value of attribute asset_only.
8 9 10 |
# File 'lib/emojidex/util/collection_checker.rb', line 8 def asset_only @asset_only end |
#index_only ⇒ Object (readonly)
Returns the value of attribute index_only.
8 9 10 |
# File 'lib/emojidex/util/collection_checker.rb', line 8 def index_only @index_only end |