motion-form 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/project/rows/base_row.rb +4 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f41c07e9e040f08b3f7bc096657dd1e8c1eebb92
|
4
|
+
data.tar.gz: 823bd6e84025e8925182e0d7f66e8c2015ed5cc1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5cc65d90f7082e5beb123c4963a1fc76a1ea7db0f6169fe4e63cb2b674d869a9f4af22ddf483bb1b5461d4dd0d2e1ccc193459dc0a711a65aae1202ac39572d
|
7
|
+
data.tar.gz: 7013d8b3485a02c3e9c113109b5f237c0b85f8eedaf5393b919a890076fc073e458611d04fc0cfe3836ebae7cf43c6c4899ea1bb1925e10bbbe74debda8e94c9
|
@@ -1,11 +1,12 @@
|
|
1
1
|
class BaseRow
|
2
|
-
attr_reader :icon, :key, :options
|
2
|
+
attr_reader :icon, :key, :label, :options
|
3
3
|
|
4
4
|
def initialize(key, options)
|
5
5
|
@key = key
|
6
6
|
@options = options
|
7
7
|
|
8
|
-
@icon = options.fetch(:icon,
|
8
|
+
@icon = options.fetch(:icon, nil)
|
9
|
+
@label = options.fetch(:label, key.to_s.titleize)
|
9
10
|
@value = options.fetch(:value, nil)
|
10
11
|
end
|
11
12
|
|
@@ -35,11 +36,7 @@ class BaseRow
|
|
35
36
|
|
36
37
|
def update_cell(cell)
|
37
38
|
cell.key = key
|
38
|
-
cell.label =
|
39
|
+
cell.label = label
|
39
40
|
cell.icon = icon
|
40
41
|
end
|
41
|
-
|
42
|
-
def name
|
43
|
-
key.to_s.titleize
|
44
|
-
end
|
45
42
|
end
|