motion-form 0.1.1 → 0.1.2

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/project/rows/base_row.rb +4 -7
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1b141a0c1221917873375d4716fb35c2ae7e7c26
4
- data.tar.gz: 1898b6adb9b7b10489a14bda250b75014dcc10ae
3
+ metadata.gz: f41c07e9e040f08b3f7bc096657dd1e8c1eebb92
4
+ data.tar.gz: 823bd6e84025e8925182e0d7f66e8c2015ed5cc1
5
5
  SHA512:
6
- metadata.gz: ced57a9c562879038d87cbc66348444189b43b8413b1bca33618baca5dad43b60b64c5a5958fa76c1d47d593815d359d1069d59202fc1901bc75acd4bfe8d43c
7
- data.tar.gz: 41c424c5cb5b7e3af7be915b1c2f3f88f5c1ad669d82da11e1f89b423a6c7f2890ae042df18dc24d68bed8967c59c9640c42066fb64edb9c4853fb6519da1913
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, nil)
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 = name
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-form
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Devon Blandin