attire 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -7
- data/lib/attire/initializer.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e5925a4cfc382fbdb58206a32e9b2c48952b5ce
|
4
|
+
data.tar.gz: 7ae88651bbceccaf71b924e657d186ce762e581b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c22d2e332413f498157b1309dd24ac30902cf5e852a98249f011f55853728d76201a77d250b4073efd9abb30f37f9ac4acaba292aec9ab3c964fc98ff8457e1
|
7
|
+
data.tar.gz: 5e7fe15ae4b53d3db1064d82885000d1cfc07a96e63263c831968da1bf2244d97bef02ca352823997c1601d85d30d5cae7614160ef4cbb05b0c1ff0a049687d1
|
data/README.md
CHANGED
@@ -43,31 +43,32 @@ end
|
|
43
43
|
Defines the following:
|
44
44
|
|
45
45
|
``` ruby
|
46
|
-
attr_init :bar
|
47
|
-
|
48
46
|
def self.select(*args, &block)
|
49
47
|
new(*args, &block).select
|
50
48
|
end
|
49
|
+
|
50
|
+
attr_init :bar
|
51
51
|
```
|
52
52
|
|
53
53
|
This is useful for method objects/use cases:
|
54
54
|
|
55
55
|
``` ruby
|
56
56
|
class CheeseSpreader
|
57
|
-
attr_method :spread, :cheese,
|
57
|
+
attr_method :spread, :cheese, crackers_class: Jacobs
|
58
58
|
|
59
59
|
def spread
|
60
|
-
|
61
|
-
cheese
|
60
|
+
cracker = crackers_class.new
|
61
|
+
cracker.spreads << cheese
|
62
|
+
cracker
|
62
63
|
end
|
63
64
|
end
|
64
65
|
|
65
|
-
CheeseSpreader.spread(
|
66
|
+
CheeseSpreader.spread(roquefort)
|
66
67
|
```
|
67
68
|
|
68
69
|
### `attr_query :foo?`
|
69
70
|
|
70
|
-
Defines query
|
71
|
+
Defines query `#foo?`, which is true if `foo` is truthy.
|
71
72
|
|
72
73
|
## Installation
|
73
74
|
|
data/lib/attire/initializer.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: attire
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Max White
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|