Fix RuboCop Style/ group offenses in docs example code
				
					
				
			This commit is contained in:
		
							parent
							
								
									af90f0858a
								
							
						
					
					
						commit
						9b6903f50b
					
				@ -1076,7 +1076,7 @@ we can use:
 | 
			
		||||
 | 
			
		||||
```ruby
 | 
			
		||||
version "1.2.3"
 | 
			
		||||
url "https://example.com/file-version-#{version.delete('.')}.dmg"
 | 
			
		||||
url "https://example.com/file-version-#{version.delete(".")}.dmg"
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
We can also leverage the power of regular expressions. So instead of:
 | 
			
		||||
@ -1090,7 +1090,7 @@ we can use:
 | 
			
		||||
 | 
			
		||||
```ruby
 | 
			
		||||
version "1.2.3build4"
 | 
			
		||||
url "https://example.com/#{version.sub(%r{build\d+}, '')}/file-version-#{version}.dmg"
 | 
			
		||||
url "https://example.com/#{version.sub(/build\d+/, "")}/file-version-#{version}.dmg"
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
#### `version` methods
 | 
			
		||||
 | 
			
		||||
@ -271,7 +271,7 @@ And install any bins, and munge their shebang lines, with:
 | 
			
		||||
 | 
			
		||||
```ruby
 | 
			
		||||
bin.install libexec/"bin/<bin>"
 | 
			
		||||
bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"])
 | 
			
		||||
bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV.fetch("GEM_HOME", nil))
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Python dependencies
 | 
			
		||||
@ -730,7 +730,7 @@ class MyDownloadStrategy < SomeHomebrewDownloadStrategy
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
class Foo < Formula
 | 
			
		||||
  url "something", :using => MyDownloadStrategy
 | 
			
		||||
  url "something", using: MyDownloadStrategy
 | 
			
		||||
end
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
@ -874,7 +874,7 @@ bin.write_jar_script libexec/jar_file, "jarfile", java_version: "11"
 | 
			
		||||
 | 
			
		||||
  ```ruby
 | 
			
		||||
(bin/"package").write_env_script libexec/"package", PACKAGE_ROOT: libexec
 | 
			
		||||
bin.env_script_all_files(libexec/"bin", PERL5LIB: ENV["PERL5LIB"])
 | 
			
		||||
bin.env_script_all_files(libexec/"bin", PERL5LIB: ENV.fetch("PERL5LIB", nil))
 | 
			
		||||
  ```
 | 
			
		||||
 | 
			
		||||
### Rewriting a script shebang
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user