Closed rye closed 4 years ago
I still have a lot of work to do regarding #mongoize
and such, and fleshing out the specs even further, but I will get there soon.
I'd like to defer this until the MatchType class has been introduced. (#111) This will make some of the refactoring which still needs to be done much easier.
This PR introduces a large number of changes and improvements to MatchNumber. Included are resolutions to #110, and work on resolution to #96.
Mostly,
MatchNumber#initialize
no longer does type checking, and instead simply propagates the object's attributes, removing the need to test it. Nascent.parse(String)
and.from_hash(Hash)
methods replace this behavior, and require the developer to make a determination in their use.Some extra raises were also removed, as they were impossible to hit. (For instance, presence checking of a required field when matching against a regular expression after validating that it was properly matched)
Some internal variables were also renamed to make them more descriptive.