Browse files

added fact_accomplished? example to README / use json-like hash syntax

  • Loading branch information...
1 parent 1ef9716 commit 18e093e90905da3e4ec4570b5ed05adb480e0ba6 @ipoval ipoval committed Jun 17, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 README.md
View
12 README.md
@@ -20,12 +20,12 @@ class Person
...
end
-p = Person.new(:job => good_job, :family => good_family, :health => :good, :intellect => :too_clever)
-p.good_job? # => true
-p.good_family? # => true
-p.is_healthy? # => true
-p.fact_possible?(:is_happy) # => true (dependency satisfied)
-p.is_happy? # => false
+p = Person.new(job: good_job, family: good_family, health: :good, intellect: :too_clever)
+p.fact_accomplished?(:good_job) # => true
+p.good_family? # => true
+p.is_healthy? # => true
+p.fact_possible?(:is_happy) # => true (dependency satisfied)
+p.is_happy? # => false
p.possible_facts - p.accomplished_facts # => [:happy]
```

0 comments on commit 18e093e

Please sign in to comment.