Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 18e093e90905da3e4ec4570b5ed05adb480e0ba6 1 parent 1ef9716
Ivan Povalyukhin ipoval authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 README.md
12 README.md
View
@@ -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]
```
Please sign in to comment.
Something went wrong with that request. Please try again.