
Untitled
By: a guest on
May 6th, 2012 | syntax:
None | size: 0.88 KB | hits: 15 | expires: Never
## Old matching
# Match different properties (tag 1)
tag "test" do
regex /foo/
match [:instance]
gravity :center
end
# Match different properties (tag 2)
tag "test" do
regex /bar/
match [:name]
gravity :center
end
# Match different properties (tag 3)
tag "test" do
type :dialog
gravity :center
end
# Match default instance and class
tag "test2" do
regex /foo/
gravity :center
end
# Match name and class
tag "test3" do
regex /foo/
match [:name, :class]
gravity :center
end
## New matching
# Match different properties
tag "test" do
match :instance => /foo/
match :name => /bar/
match :type => :dialog
gravity :center
end
# Match default instance and class
tag "test2" do
match /foo/
gravity :center
end
# Match name and class
tag "test3" do
match [:name, :class] => /foo/
gravity :center
end