Showing the changes to lib/docs/filters/javascript (1 of 3 files). Show all
Unified · Split
| @@ -8,14 +8,14 @@ module Docs · 7 unmodified lines | ||
| 8 | 8 | |
| 9 | 9 | def get_name |
| 10 | 10 | if slug.start_with? 'Global_Objects/' |
| 11 | − name, method = *slug.sub('Global_Objects/', '').split('/') | |
| 11 | + name, method, *rest = *slug.sub('Global_Objects/', '').split('/') | |
| 12 | 12 | name.prepend 'Intl.' if INTL_OBJECTS.include?(name) |
| 13 | 13 | |
| 14 | 14 | if method |
| 15 | 15 | unless method == method.upcase || method == 'NaN' |
| 16 | 16 | method = method[0].downcase + method[1..-1] # e.g. Trim => trim |
| 17 | 17 | end |
| 18 | − name << ".#{method}" | |
| 18 | + name << ".#{([method] + rest).join('.')}" | |
| 19 | 19 | end |
| 20 | 20 | |
| 21 | 21 | name |