Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TonelWriter>>#createDefaultOrganizationFrom: can return string #70

Closed
pavel-krivanek opened this issue Jan 10, 2019 · 0 comments · Fixed by #71
Closed

TonelWriter>>#createDefaultOrganizationFrom: can return string #70

pavel-krivanek opened this issue Jan 10, 2019 · 0 comments · Fixed by #71

Comments

@pavel-krivanek
Copy link
Contributor

TonelWriter>>#createDefaultOrganizationFrom: should return an MCOrganization but currently it can return a string (a category name). The code should be:

createDefaultOrganizationFrom: aCollection
	"answers a default organisation for the cases where there are none"

	"simplest case, I answer the clas definition"
	snapshot definitions 
		detect: #isClassDefinition
		ifFound: [ :each | ^ MCOrganizationDefinition categories: { each category } ].
	
	^ self createDefaultOrganizationFromDefinition: (snapshot definitions
		detect: #isMethodDefinition
		ifNone: [ self error: 'cannot determine package name from empty snapshot' ])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants