labelizer 0.1.7 → 0.999.0
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.
- checksums.yaml +8 -8
- data/README.md +37 -0
- data/lib/labelizer/version.rb +1 -1
- data/version.txt +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjA5YWJmMjBhMWVjZTllN2YzNjRkNjczZGZiNTA1ZDFhZWNjYjg3MQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDg5NGE3M2ZlMzRiMTBlMGFlMWZjZjkwZDhhOGM2ZmY3OGZiNTZkZg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OTA0N2Y4ZGY2NWQzNGYzZDljZjYwOWU4ZDMyMGQzMzA4MWViYjc4M2E0YWQ0
|
10
|
+
ZGJiOGUzMmI2Y2JmMGZiNWY0ZjBhMjhmZDZiYzA2NDg2Yzc5NDRmZDY3YzA1
|
11
|
+
NTEyM2U5OWRjY2VlNTRkYjdkMjhhMTk0YTQxYTU3MGNiZmUwMmU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODMwMGZhMjBmYWM3N2E0NjJjYjEyMDNiOTIwODA4MzNkYzM3NTQzMjYyNzg1
|
14
|
+
MDE2N2Q4OGY0OWFjMzgyNDk3MzI3M2NhYjY0NGMyZTc0M2NmN2U1MmI0MmE0
|
15
|
+
NTZjN2ZmOGYxN2Q2NjdiMzI0YTZkOWU0NWU2MzE2MGVlNzA3YTA=
|
data/README.md
CHANGED
@@ -156,6 +156,43 @@ end
|
|
156
156
|
```
|
157
157
|
|
158
158
|
|
159
|
+
## non string values
|
160
|
+
|
161
|
+
```ruby
|
162
|
+
class Customer < ApplicationModel
|
163
|
+
include Labelizer
|
164
|
+
|
165
|
+
def self.is_checkeds
|
166
|
+
[true,false]
|
167
|
+
end
|
168
|
+
def self.my_flags
|
169
|
+
[1,2,3]
|
170
|
+
end
|
171
|
+
|
172
|
+
labelize :is_checked, %w(label)
|
173
|
+
labelize :my_flag, %w(label)
|
174
|
+
end
|
175
|
+
```
|
176
|
+
|
177
|
+
```yaml
|
178
|
+
ja:
|
179
|
+
labelizer:
|
180
|
+
customer:
|
181
|
+
is_checked:
|
182
|
+
"true":
|
183
|
+
label: ...
|
184
|
+
"false":
|
185
|
+
label: ...
|
186
|
+
my_flag:
|
187
|
+
"1":
|
188
|
+
label: ...
|
189
|
+
"2":
|
190
|
+
label: ...
|
191
|
+
"3":
|
192
|
+
label: ...
|
193
|
+
```
|
194
|
+
|
195
|
+
|
159
196
|
## array value
|
160
197
|
|
161
198
|
```ruby
|
data/lib/labelizer/version.rb
CHANGED
data/version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.999.0
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: labelizer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.999.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- shun
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|