Permalink
Browse files

minor minor tweaks

  • Loading branch information...
1 parent 69ff63b commit 3d9e52763625c7d5a74d706fb54ca11d321fcf11 @defunkt defunkt committed Mar 2, 2008
Showing with 4 additions and 8 deletions.
  1. +1 −1 commands.rb
  2. +3 −7 lib/github.rb
View
@@ -1,4 +1,4 @@
-GitHub.register :helper do |name,comma_args|
+GitHub.register :helper do |name, comma_args|
comma_args ||= ''
puts helper.send(name, comma_args.split(/,/))
end
View
@@ -16,10 +16,10 @@
#
module GitHub
- BASE_PATH = File.expand_path(File.dirname(__FILE__) + '/..')
-
extend self
+ BasePath = File.expand_path(File.dirname(__FILE__) + '/..')
+
def register(command, &block)
debug "Registered `#{command}`"
commands[command.to_s] = Command.new(block)
@@ -56,11 +56,7 @@ def descriptions
end
def load(file)
- if file[0] == ?/
- super
- else
- super(BASE_PATH + "/#{file}")
- end
+ file[0] == ?/ ? super : super(BasePath + "/#{file}")
end
def debug(*messages)

0 comments on commit 3d9e527

Please sign in to comment.