diff --git a/lib/jazzy/sourcekitten.rb b/lib/jazzy/sourcekitten.rb
index <HASH>..<HASH> 100644
--- a/lib/jazzy/sourcekitten.rb
+++ b/lib/jazzy/sourcekitten.rb
@@ -161,6 +161,15 @@ module Jazzy
       end
     end
 
+    # returns all subdirectories of specified path
+    def self.rec_path(path)
+      path.children.collect do |child|
+        if child.directory?
+          rec_path(child) + [child]
+        end
+      end.select { |x| x }.flatten(1)
+    end
+
     # Builds SourceKitten arguments based on Jazzy options
     def self.arguments_from_options(options)
       arguments = ['doc']
@@ -170,8 +179,10 @@ module Jazzy
                         'objective-c', '-isysroot',
                         `xcrun --show-sdk-path --sdk #{options.sdk}`.chomp,
                         '-I', options.framework_root.to_s]
-          # add additional -I arguments for each subdirectory of framework_root
-          Pathname.new(options.framework_root.to_s).children.collect do |child|
+        end
+        # add additional -I arguments for each subdirectory of framework_root
+        unless options.framework_root.nil?
+          rec_path(Pathname.new(options.framework_root.to_s)).collect do |child|
             if child.directory?
               arguments += ['-I', child.to_s]
             end
Include all subfolders of framework_root

Check if framework_root option is set and include all subfolders (recursively) of framework_root.