Module: RailsIcons::Configuration::Weather

Extended by:
Weather
Included in:
Weather
Defined in:
lib/rails_icons/configuration/weather.rb

Instance Method Summary collapse

Instance Method Details

#configObject



8
9
10
11
12
13
14
15
# File 'lib/rails_icons/configuration/weather.rb', line 8

def config
  ActiveSupport::OrderedOptions.new.tap do |options|
    options.default_variant = nil
    options.exclude_variants = []

    options.default = default_options
  end
end

#initializer_configObject



17
18
19
20
21
22
23
24
25
26
# File 'lib/rails_icons/configuration/weather.rb', line 17

def initializer_config
  <<~RB.indent(2)
    # Override Weather defaults
    # config.libraries.weather.default_variant = "" # Set a default variant for Wweather
    # config.libraries.weather.exclude_variants = []

    # config.libraries.weather.default.css = "size-6"
    # config.libraries.weather.default.data = {}
  RB
end

#sourceObject



28
29
30
31
32
33
34
35
# File 'lib/rails_icons/configuration/weather.rb', line 28

def source
  {
    url: "https://github.com/erikflowers/weather-icons.git",
    variants: {
      ".": "svg" # Weather has no variants, store in the top directory
    }
  }
end

#transformationsObject



37
38
39
40
41
42
43
# File 'lib/rails_icons/configuration/weather.rb', line 37

def transformations
  {
    filenames: {
      delete_prefix: ["wi-"]
    }
  }
end