grand_central 0.4.3 → 0.4.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 266abd370c29453e31dd35502c96be0f3a21d828
4
- data.tar.gz: 22bda60bddf0c48cf12f716f8ce1fd2da492782c
3
+ metadata.gz: 3a3a3cc73a89f4c695d4e4c5277fb4cc428c808e
4
+ data.tar.gz: db1292b19b6f2838d4bb24ce16d1d11907bdf1a1
5
5
  SHA512:
6
- metadata.gz: f7c028653e0dbe5e75db1427178397ecaa385d788802bceac0592a1b388d0cb16524b6ff6cd269cbd1323db24297719bdd8176b6bc0142fca90e14e351597379
7
- data.tar.gz: c9d03f2caae8ca63bae4055c2a58a5861511705c270025cffa4fd598d61c0fa774143ca4b18735fe3b3cfbb8a964ea2043a11918c5079df76f329024fc218f1f
6
+ metadata.gz: 91d3814a9f5a5ec8c63a18ebddedb37c9e8bdc046aa7dc4724c13e9feae2bccae528a3a987a4748a5a00c83dd80db3cb5246f0a1bb98871439bf625416865eb5
7
+ data.tar.gz: 22e7f863963c560cdcaaf7ae50c0fdc6beb8e14d582f1eafe761b9f0c929ec3c8cdc0d91c1260263886afd9472858fb0e622ff3e1358bd6336e2a0a562a02fc3
@@ -89,30 +89,34 @@ module GrandCentral
89
89
  return args
90
90
  end
91
91
 
92
- if args.first.class.name == 'Bowser::Event'
93
- event = args.first
94
- case event.type
95
- when 'submit'
96
- # We're modifying a value we received, which is usually a no-no, but
97
- # in this case it's the most pragmatic solution I can think of.
98
- event.prevent
99
- when 'input'
100
- event.target.value
101
- when 'change'
102
- element = event.target
103
-
104
- # In hindsight, using Element#type for the tag type was a bad idea.
105
- # It means we need to dip into JS to get the damn type property.
106
- if element.type == 'input' && `#{element.to_n}.type` == 'checkbox'
107
- element.checked?
92
+ args.map do |arg|
93
+ if arg.class.name == 'Bowser::Event'
94
+ event = arg
95
+
96
+ case event.type
97
+ when 'submit'
98
+ # We're modifying a value we received, which is usually a no-no, but
99
+ # in this case it's the most pragmatic solution I can think of.
100
+ event.prevent
101
+ event
102
+ when 'input'
103
+ event.target.value
104
+ when 'change'
105
+ element = event.target
106
+
107
+ # In hindsight, using Element#type for the tag type was a bad idea.
108
+ # It means we need to dip into JS to get the damn type property.
109
+ if element.type == 'input' && `#{element.to_n}.type` == 'checkbox'
110
+ element.checked?
111
+ else
112
+ element.value
113
+ end
108
114
  else
109
- element.value
115
+ arg
110
116
  end
111
117
  else
112
- args
118
+ arg
113
119
  end
114
- else
115
- args
116
120
  end
117
121
  end
118
122
  end
@@ -1,3 +1,3 @@
1
1
  module GrandCentral
2
- VERSION = "0.4.3"
2
+ VERSION = "0.4.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grand_central
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamie Gaskins