diff options
author | Casey Dahlin <cdahlin@redhat.com> | 2008-12-15 11:51:57 -0500 |
---|---|---|
committer | Casey Dahlin <cdahlin@redhat.com> | 2008-12-15 11:51:57 -0500 |
commit | d94e3ebf1adfd83a356f015c1d56122e601e83c0 (patch) | |
tree | ffe841f6e7972be3c19cd683da1c163b07ce6e1b | |
parent | 5c3a7bf109e55ecae2664032bce47506db36d9a7 (diff) | |
download | upstate-d94e3ebf1adfd83a356f015c1d56122e601e83c0.tar.gz upstate-d94e3ebf1adfd83a356f015c1d56122e601e83c0.tar.xz upstate-d94e3ebf1adfd83a356f015c1d56122e601e83c0.zip |
Add a couple of helpers to base classes
-rw-r--r-- | state.rb | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -16,6 +16,19 @@ unless Array.instance_methods.include? "product" end end +class Array + # Confirm that this array has no duplicate elements + def is_uniq? + self == self.uniq + end +end + +class Symbol + def <=>(other) + self.to_s <=> other.to_s + end +end + module UpState # Occurs when the state machine becomes inconsistent |