Closed Ashton-W closed 9 years ago
Hey
The default is stored in identifiers.yml
It's stored as mappings from xib class
to identifier
name.
The default looks like
---
segue: identifier
tableViewCell: reuseIdentifier
collectionViewCell: reuseIdentifier
view: restorationIdentifier
? - navigationController
- viewController
- tableViewController
- collectionViewController
: - storyboardIdentifier
- restorationIdentifier
What actually happens upon parsing in options.rb is both the key and value are enumerated as arrays (converting to an Array if required). This enables a single xib class
to have multiple identifier
s to look for. It also enables multiple xib class
' to have the same identifier
s without duplicating it in the yaml.
In the default segue
, tableViewCell
, collectionViewCell
, view
are all only looking for one identifier
each. There is some duplication for tableViewCell
and collectionViewCell
and they could be mapped into a dictionary - I must not have been paying attention when I merged that.
Then navigationController
, viewController
, tableViewController
and collectionViewController
all look for two identifier
s
I'm not a massive fan of yaml syntax but I'm sure at the time I must have tried most other common formats and gone for this one because of it's lack of duplication and bracket noise
Didn't see that file, thanks!
What is the format of the YAML file containing queries?
Perhaps the default query should be moved to YAML for consistency and reference.