Sha256: 0c2e047e996e63c22401ea9142e6a7cac89a9aa95e66fac48e5e4c784ce6a690
Contents?: true
Size: 1.01 KB
Versions: 16
Compression:
Stored size: 1.01 KB
Contents
require_relative '../../service/transactor' require_relative '../../env_helper' module Emojidex module Data # mixin module to enable static collections module StaticCollection def load_from_server(detailed = true, locale = '??') locale = @locale || Emojidex::EnvHelper.lang? if locale == '??' begin res = Emojidex::Service::Transactor.get(@endpoint, detailed: detailed, locale: locale) rescue false end add_emoji(res) true end def check_and_load_static(collection) loaded = false if defined? Emojidex::Vectors @vector_source_path = Emojidex::Vectors.path + "/#{collection}/" load_local_collection @vector_source_path loaded = true end if defined? Emojidex::Rasters @raster_source_path = Emojidex::Rasters.path + "/#{collection}/" load_local_collection @raster_source_path loaded = true end loaded end end end end
Version data entries
16 entries across 16 versions & 1 rubygems