Created
January 29, 2010 20:14
-
-
Save cldwalker/290074 to your computer and use it in GitHub Desktop.
Example of overriding a boson core command in a separate library
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module MyCore | |
def self.config | |
{:force=>true} | |
end | |
# My overridden version that also handles arrays of hashes with :url | |
def browser(*urls) | |
urls.map! {|e| e[:url] } if urls[0].is_a?(Hash) and urls[0].has_key?(:url) | |
system('open', *urls) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment