moved attribute assignment methods into a dedicated module
borrowed multiparameter attribute handling methods from Rails, modified them