Sha256: e3ac40c5e3111544412581c06a10dc39c5a360f073de9a7965a35b9cc2147527

Contents?: true

Size: 630 Bytes

Versions: 12

Compression:

Stored size: 630 Bytes

Contents

# frozen_string_literal: true

# atome sanitizer
class Atome
  private

  def create_color_hash(params)
    rgb_color = Color::CSS[params].css_rgb
    split_data = rgb_color.sub('rgb(', '').sub(')', '').gsub(',', '').split('%')
    { red: split_data[0].to_f / 100, green: split_data[1].to_f / 100, blue: split_data[2].to_f / 100 }
  end

  def found_parents_and_renderers
    if @atome
      parent_found = [@atome[:id]]
      render_found = @atome[:renderers]
    else
      parent_found = []
      render_found = Essentials.default_params[:render_engines]
    end
    { parent: parent_found, renderers: render_found }
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
atome-0.5.3.8.1 lib/atome/helpers/sanitizer.rb
atome-0.5.3.8.0 lib/atome/helpers/sanitizer.rb
atome-0.5.3.7.8 lib/atome/helpers/sanitizer.rb
atome-0.5.3.7.3 lib/atome/helpers/sanitizer.rb
atome-0.5.3.7.2 lib/atome/helpers/sanitizer.rb
atome-0.5.3.4 lib/atome/helpers/sanitizer.rb
atome-0.5.3.2 lib/atome/helpers/sanitizer.rb
atome-0.5.2.8 lib/atome/helpers/sanitizer.rb
atome-0.5.2.7 lib/atome/helpers/sanitizer.rb
atome-0.5.2.5 lib/atome/helpers/sanitizer.rb
atome-0.5.1.9 lib/atome/helpers/sanitizer.rb
atome-0.5.1.4 lib/atome/helpers/sanitizer.rb