Sha256: eec119c0f4a1abc469ea2114ced78e0c530f5e285ba233be432be60193ed48a6

Contents?: true

Size: 711 Bytes

Versions: 1

Compression:

Stored size: 711 Bytes

Contents

# frozen_string_literal: true

a = box({ id: :my_box, left: 333 }) do |p|
  puts "the param pass to the box is: #{p}"
  wait 2 do
    left(120)
  end
end

b = Atome.new(
  { shape: { render: [:html], id: :view_test, type: :shape, parents: [:view],children: [],
             left: 0, width: 90, top: 0, height: 90, overflow: :auto,
             color: { render: [:html], id: :view_test_color, type: :color, parents: [:view_test],
                      red: 1, green: 0.15, blue: 0.15, alpha: 1 } } }
) do |p|
  puts "the param pass to the atome is: #{p}"

end

bloc_a = a.bloc.value
bloc_b = b.bloc.value
a.instance_exec(:hello, &bloc_a) if bloc_a.is_a?(Proc)
b.instance_exec(:hi, &bloc_b) if bloc_b.is_a?(Proc)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
atome-0.5.1.1 vendor/assets/build/medias/rubies/examples/box.rb