predicates 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +17 -16
- data/lib/predicates/version.rb +1 -1
- data/lib/predicates.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -2,24 +2,11 @@
|
|
2
2
|
|
3
3
|
[Predicates](http://erol.github.com/predicates) are truth accessors for your Ruby classes and models. Yep, that's about it.
|
4
4
|
|
5
|
-
|
6
|
-
## Installation
|
7
|
-
|
8
|
-
Add this line to your application's Gemfile:
|
9
|
-
|
10
|
-
gem 'predicates'
|
11
|
-
|
12
|
-
And then execute:
|
13
|
-
|
14
|
-
$ bundle
|
15
|
-
|
16
|
-
Or install it yourself as:
|
17
|
-
|
18
|
-
$ gem install predicates
|
19
|
-
|
20
5
|
## Usage
|
21
6
|
|
22
|
-
|
7
|
+
Extend your class or model with Predicates and define the predicate by supplying an attribute:
|
8
|
+
|
9
|
+
require 'predicates'
|
23
10
|
|
24
11
|
class User
|
25
12
|
extend Predicates
|
@@ -44,6 +31,20 @@ Predicates will also create an attribute writer for you using `attr_writer` if t
|
|
44
31
|
user.confirmed = 1
|
45
32
|
user.confirmed? #=> true
|
46
33
|
|
34
|
+
## Installation
|
35
|
+
|
36
|
+
Add this line to your application's Gemfile:
|
37
|
+
|
38
|
+
gem 'predicates'
|
39
|
+
|
40
|
+
And then execute:
|
41
|
+
|
42
|
+
$ bundle
|
43
|
+
|
44
|
+
Or install it yourself as:
|
45
|
+
|
46
|
+
$ gem install predicates
|
47
|
+
|
47
48
|
## Contributing
|
48
49
|
|
49
50
|
1. Fork it
|
data/lib/predicates/version.rb
CHANGED
data/lib/predicates.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: predicates
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-09-
|
12
|
+
date: 2012-09-24 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Truth accessors for Ruby classes and models.
|
15
15
|
email:
|