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 | def get_name | 9 | def get_name |
| 10 | if slug.start_with? 'Global_Objects/' | 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 | name.prepend 'Intl.' if INTL_OBJECTS.include?(name) | 12 | name.prepend 'Intl.' if INTL_OBJECTS.include?(name) |
| 13 | 13 | ||
| 14 | if method | 14 | if method |
| 15 | unless method == method.upcase || method == 'NaN' | 15 | unless method == method.upcase || method == 'NaN' |
| 16 | method = method[0].downcase + method[1..-1] # e.g. Trim => trim | 16 | method = method[0].downcase + method[1..-1] # e.g. Trim => trim |
| 17 | end | 17 | end |
| 18 | name << ".#{method}" | 18 | name << ".#{([method] + rest).join('.')}" |
| 19 | end | 19 | end |
| 20 | 20 | ||
| 21 | name | 21 | name |