| 
									
										
										
										
											2012-08-30 22:54:24 -04:00
										 |  |  | require 'formula' | 
					
						
							|  |  |  | require 'keg' | 
					
						
							|  |  |  | require 'irb' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-08-31 08:09:50 -04:00
										 |  |  | class Symbol | 
					
						
							|  |  |  |   def f | 
					
						
							| 
									
										
										
										
											2013-06-23 13:05:06 -07:00
										 |  |  |     Formula.factory(self.to_s) | 
					
						
							| 
									
										
										
										
											2012-08-31 08:09:50 -04:00
										 |  |  |   end | 
					
						
							|  |  |  | end | 
					
						
							| 
									
										
										
										
											2012-08-30 22:54:24 -04:00
										 |  |  | class String | 
					
						
							|  |  |  |   def f | 
					
						
							|  |  |  |     Formula.factory(self) | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-08-06 14:41:55 -04:00
										 |  |  | module Homebrew extend self | 
					
						
							|  |  |  |   def irb | 
					
						
							|  |  |  |     if ARGV.include? "--help" | 
					
						
							| 
									
										
										
										
											2012-08-31 08:09:50 -04:00
										 |  |  |       puts "'v8'.f # => instance of the Ack formula" | 
					
						
							|  |  |  |       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" | 
					
						
							|  |  |  |       puts "Example commands available with: brew irb --help" | 
					
						
							| 
									
										
										
										
											2012-08-21 09:51:28 -04:00
										 |  |  |       IRB.start | 
					
						
							| 
									
										
										
										
											2012-08-06 14:41:55 -04:00
										 |  |  |     end | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | end |