Skip to content

Commit

Permalink
simplify available?
Browse files Browse the repository at this point in the history
  • Loading branch information
timoschilling committed Feb 9, 2013
1 parent 14a522c commit 3d5ec6b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Ruby/lib/terminal-notifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ module TerminalNotifier
class UnsupportedPlatformError < StandardError; end
# Returns wether or not the current platform is Mac OS X 10.8, or higher.
def self.available?
if @available.nil?
@available = `uname`.strip == 'Darwin' && `sw_vers -productVersion`.strip >= '10.8'
end
@available
@available ||= `uname`.strip == 'Darwin' && `sw_vers -productVersion`.strip >= '10.8'
end

def self.execute(verbose, options)
Expand Down

0 comments on commit 3d5ec6b

Please sign in to comment.