YARD friendly code generation

@jarib Specs now pass. I had to remove some attributes from generated interfaces because they overwrite some element methods. Please, review code.
Yeah, that's not the best code for this, though it was the easiest for me to write. Let's leave it like that for now.