Class: Emojidex::Data::ComponentSet
- Inherits:
-
Object
- Object
- Emojidex::Data::ComponentSet
- Includes:
- EmojiComponentSetAssetInformation
- Defined in:
- lib/emojidex/data/emoji/component_set.rb
Overview
Combination information container
Instance Attribute Summary collapse
-
#base ⇒ Object
-
base: the named base that this combination belongs to * combinations: combinations starting with this emoji; base/components/component order * cutomizations: emoji which start customization of this emoji (this is combination base).
-
-
#component_layer_order ⇒ Object
-
base: the named base that this combination belongs to * combinations: combinations starting with this emoji; base/components/component order * cutomizations: emoji which start customization of this emoji (this is combination base).
-
-
#components ⇒ Object
-
base: the named base that this combination belongs to * combinations: combinations starting with this emoji; base/components/component order * cutomizations: emoji which start customization of this emoji (this is combination base).
-
Attributes included from EmojiComponentSetAssetInformation
#checksums, #paths, #remote_checksums
Instance Method Summary collapse
-
#initialize(code, combination_info, details = {}) ⇒ ComponentSet
constructor
A new instance of ComponentSet.
- #to_json(options = {}) ⇒ Object
Methods included from EmojiComponentSetAssetInformation
#blank_checksums, #blank_paths, #fill_paths, #fill_remote_checksums, #generate_blank_entry_set, #generate_blank_path_set, #generate_checksum, #generate_checksums, #init_asset_info
Constructor Details
#initialize(code, combination_info, details = {}) ⇒ ComponentSet
Returns a new instance of ComponentSet.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/emojidex/data/emoji/component_set.rb', line 14 def initialize(code, combination_info, details = {}) @base = combination_info[:base] @components = combination_info[:components] if combination_info.include? :component_layer_order @component_layer_order = combination_info[:component_layer_order] else @component_layer_order = [] for i in 0..(@components.length - 1) @component_layer_order << i end end init_asset_info(details) end |
Instance Attribute Details
#base ⇒ Object
-
base: the named base that this combination belongs to
-
combinations: combinations starting with this emoji; base/components/component order
-
cutomizations: emoji which start customization of this emoji (this is combination base)
10 11 12 |
# File 'lib/emojidex/data/emoji/component_set.rb', line 10 def base @base end |
#component_layer_order ⇒ Object
-
base: the named base that this combination belongs to
-
combinations: combinations starting with this emoji; base/components/component order
-
cutomizations: emoji which start customization of this emoji (this is combination base)
10 11 12 |
# File 'lib/emojidex/data/emoji/component_set.rb', line 10 def component_layer_order @component_layer_order end |
#components ⇒ Object
-
base: the named base that this combination belongs to
-
combinations: combinations starting with this emoji; base/components/component order
-
cutomizations: emoji which start customization of this emoji (this is combination base)
10 11 12 |
# File 'lib/emojidex/data/emoji/component_set.rb', line 10 def components @components end |
Instance Method Details
#to_json(options = {}) ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'lib/emojidex/data/emoji/component_set.rb', line 30 def to_json( = {}) { base: @base, component_layer_order: @component_layer_order, components: @components, checksums: @checksums }.to_json end |