Sha256: b68f47608b2ea821aa73e10fdde93a7fb5a24695687fd29f076d1a7ed61ff645
Contents?: true
Size: 1.66 KB
Versions: 11
Compression:
Stored size: 1.66 KB
Contents
# frozen_string_literal: true new({ renderer: :html, method: :diffusion, type: :string }) new({ method: :red, type: :integer, specific: :color, renderer: :html }) do |value, _user_proc| end new({ method: :green, type: :integer, specific: :color, renderer: :html }) do |value, _user_proc| end new({ method: :blue, type: :integer, specific: :color, renderer: :html }) do |value, _user_proc| end new({ method: :alpha, type: :integer, specific: :color, renderer: :html }) do |value, _user_proc| end new({ renderer: :html, method: :diffusion, type: :string }) # edit new({ renderer: :html, method: :edit }) do |params| html.attr(:contenteditable, params) html.update_data(params) end new({ method: :border, type: :hash, renderer: :html }) do |value, _user_proc| thickness = value[:thickness] || 5 type = value[:pattern] || :solid color = if value[:color] color_found = value[:color] "#{color_found.red * 255},#{color_found.green * 255},#{color_found.blue * 255},#{color_found.alpha} " else "0,0,0,1" end html.style(:border, "#{type} #{thickness}px rgba(#{color})") end new({ method: :clean, renderer: :html, type: :hash }) do |params| html.table_clean(params) end new({ method: :insert, renderer: :html, type: :hash }) do |params| html.table_insert(params) end new({ method: :remove, renderer: :html, type: :hash }) do |params| html.table_remove(params) end new({ method: :sort, renderer: :html, type: :hash }) do |params| html.refresh_table(params) end new({ particle: :unit, store: false }) do |params| params.each do |k, v| @unit[k] = v # now we refresh the particle send(k, send(k)) end @unit end
Version data entries
11 entries across 11 versions & 1 rubygems