yoshimkd/swift-auto-diagram

Execution breaks for nested classes/structs

pontus-andersson opened this issue · 1 comments

The execution breaks if the project contains nested classes, e.g.:

class MyClass {
    struct MyStruct {
        static let value = 7
    }   
}

The following error is presented:

/Users/x-three/Documents/Repositories/swift-auto-diagram/rubyResources/helpers.rb:64:in `gsub!': wrong argument type nil (expected Regexp) (TypeError)
    from /Users/x-three/Documents/Repositories/swift-auto-diagram/rubyResources/helpers.rb:64:in `block (2 levels) in createEntities'
    from /Users/x-three/Documents/Repositories/swift-auto-diagram/rubyResources/helpers.rb:60:in `each'
    from /Users/x-three/Documents/Repositories/swift-auto-diagram/rubyResources/helpers.rb:60:in `block in createEntities'
    from /Users/x-three/Documents/Repositories/swift-auto-diagram/rubyResources/helpers.rb:55:in `each'
    from /Users/x-three/Documents/Repositories/swift-auto-diagram/rubyResources/helpers.rb:55:in `createEntities'
    from /Users/x-three/Documents/Repositories/swift-auto-diagram/rubyResources/helpers.rb:13:in `block in entitiesFromFiles'
    from /Users/x-three/Documents/Repositories/swift-auto-diagram/rubyResources/helpers.rb:5:in `each'
    from /Users/x-three/Documents/Repositories/swift-auto-diagram/rubyResources/helpers.rb:5:in `entitiesFromFiles'
    from generateEntityDiagram.rb:60:in `<main>'

Thank you very much for noticing 👍
I just fixed the issue, let me know if you have any more problems...

Regards,
Jovan