lib/github_api/api/actions.rb in github_api-0.4.3 vs lib/github_api/api/actions.rb in github_api-0.4.4
- old
+ new
@@ -16,12 +16,12 @@
super
end
def api_methods_in(klass)
puts "---"
- (klass.send(:instance_methods, false) - ['actions']).sort.each do |rest_met|
- puts "|--> #{rest_met}"
+ (klass.send(:instance_methods, false) - ['actions']).sort.each do |method|
+ puts "|--> #{method}"
end
klass.included_modules.each do |mod|
if mod.to_s =~ /#{klass}/
puts "| \\ #{mod.to_s}"
mod.instance_methods(false).each do |met|
@@ -30,9 +30,21 @@
puts "| /"
end
end
puts "---"
nil
+ end
+
+ def append_arguments(method)
+ _method = self.method(method)
+ if _method.arity == 0
+ args = "()"
+ elsif _method.arity > 0
+ args = "(few)"
+ else
+ args = "(else)"
+ end
+ args
end
end # API
end # Github