Commit f02a48d
committed
ExtractPlist: refactor URL options handling
This maintains the same behavior of the logic for handling `livecheck`
block URL options but cleans it up a little. Namely:
* Use trailing `if` in `filter_map` instead of ternary with `nil`
branch.
* Use `options` instead of `cask.livecheck.options`, as these are the
same here.
* Use `select` with a `nil?` guard instead of `compact.each` and
pushing to an external variable, as this is a little tidier and uses
less memory allocation.1 parent 4fac1d8 commit f02a48d
1 file changed
+11
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
115 | | - | |
| 114 | + | |
116 | 115 | | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
122 | 122 | | |
| 123 | + | |
| 124 | + | |
123 | 125 | | |
124 | 126 | | |
125 | 127 | | |
| |||
130 | 132 | | |
131 | 133 | | |
132 | 134 | | |
133 | | - | |
| 135 | + | |
134 | 136 | | |
135 | 137 | | |
136 | 138 | | |
| |||
0 commit comments