And when I post things on here, I'm always thinking 'will that sit right with everyone else, cause they're AS, so they would probably like something like this ... * type type type*' as apposed to 'this is me, I hope you like who I am, shame if you don't'.
Converts a text string into an enumerated text of the type specified by _type. and if you're Dynamics Ax is configured in English, this code will work fine.
And since convertibles are pretty rare in your code, you have cars be sedans by default. class Car attr_reader: type def initialize (type =: sedan) @type = type end def door_count case type when: convertible when: sedan end end def go_forward end end
Where Type = @type if only one type is ok, more one is error example: