summaryrefslogtreecommitdiffstats
path: root/example.rb
diff options
context:
space:
mode:
authorCasey Dahlin <cdahlin@redhat.com>2008-12-21 20:14:52 -0500
committerCasey Dahlin <cdahlin@redhat.com>2008-12-21 20:14:52 -0500
commit24781fbc3ad4640b360e92561948f412fbb7ef3e (patch)
treefb6964cc9843d41aa79e96502c967135402edbad /example.rb
parent8962d343063795e1d9eb6b2c5d53e90c405c59c5 (diff)
downloadupstate-24781fbc3ad4640b360e92561948f412fbb7ef3e.tar.gz
upstate-24781fbc3ad4640b360e92561948f412fbb7ef3e.tar.xz
upstate-24781fbc3ad4640b360e92561948f412fbb7ef3e.zip
Beginnings of python rewrite
Diffstat (limited to 'example.rb')
-rw-r--r--example.rb19
1 files changed, 0 insertions, 19 deletions
diff --git a/example.rb b/example.rb
deleted file mode 100644
index 182ae1d..0000000
--- a/example.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-require 'state'
-
-include UpState
-
-HdAvail = State.new_type("hdAvail", [Event.new("DevKit_FoundHD")], [], [:uid, :name, :blkdev])
-FstabAvail = State.new_type("fstabLine", [Event.new("Can_Mount", {:mount_str => /.*/})], [], [[:uid, :name, :blkdev], :mount_str])
-Mount = State.new_type("mount", [Event::Epsilon], [Dependency.new(HdAvail, {:uid => /.*/}), Dependency.new(FstabAvail, {:mount_str => /.*/})])
-
-events = [
- ["DevKit_FoundHD", {:uid => "1234", :name => "myhd", :blkdev => "/dev/sda1"}],
- ["Can_Mount", {:uid => "1234", :mount_str => "/home"}],
- ["Can_Mount", {:uid => "1234"}],
-]
-
-State.print_all_color
-events.each do |x|
- State.process_event Event.new(*x)
- State.print_all_color
-end