| 
									
										
										
										
											2015-08-03 13:09:07 +01:00
										 |  |  | require "formula" | 
					
						
							|  |  |  | require "keg" | 
					
						
							|  |  |  | require "irb" | 
					
						
							| 
									
										
										
										
											2012-08-30 22:54:24 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-08-31 08:09:50 -04:00
										 |  |  | class Symbol | 
					
						
							| 
									
										
										
										
											2015-01-04 21:37:27 -05:00
										 |  |  |   def f(*args) | 
					
						
							|  |  |  |     Formulary.factory(to_s, *args) | 
					
						
							| 
									
										
										
										
											2012-08-31 08:09:50 -04:00
										 |  |  |   end | 
					
						
							|  |  |  | end | 
					
						
							| 
									
										
										
										
											2012-08-30 22:54:24 -04:00
										 |  |  | class String | 
					
						
							| 
									
										
										
										
											2015-01-04 21:37:27 -05:00
										 |  |  |   def f(*args) | 
					
						
							|  |  |  |     Formulary.factory(self, *args) | 
					
						
							| 
									
										
										
										
											2012-08-30 22:54:24 -04:00
										 |  |  |   end | 
					
						
							|  |  |  | end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-06-18 22:41:47 -05:00
										 |  |  | module Homebrew | 
					
						
							| 
									
										
										
										
											2012-08-06 14:41:55 -04:00
										 |  |  |   def irb | 
					
						
							| 
									
										
										
										
											2015-01-02 15:11:24 +01:00
										 |  |  |     if ARGV.include? "--examples" | 
					
						
							| 
									
										
										
										
											2014-06-19 19:13:45 -05:00
										 |  |  |       puts "'v8'.f # => instance of the v8 formula" | 
					
						
							| 
									
										
										
										
											2012-08-31 08:09:50 -04:00
										 |  |  |       puts ":hub.f.installed?" | 
					
						
							|  |  |  |       puts ":lua.f.methods - 1.methods" | 
					
						
							| 
									
										
										
										
											2013-04-10 11:52:54 -05:00
										 |  |  |       puts ":mpd.f.recursive_dependencies.reject(&:installed?)" | 
					
						
							| 
									
										
										
										
											2012-08-06 14:41:55 -04:00
										 |  |  |     else | 
					
						
							|  |  |  |       ohai "Interactive Homebrew Shell" | 
					
						
							| 
									
										
										
										
											2015-01-02 15:11:24 +01:00
										 |  |  |       puts "Example commands available with: brew irb --examples" | 
					
						
							| 
									
										
										
										
											2012-08-21 09:51:28 -04:00
										 |  |  |       IRB.start | 
					
						
							| 
									
										
										
										
											2012-08-06 14:41:55 -04:00
										 |  |  |     end | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | end |