add 'rule' concept and provide more methods

info hash now contains a rule. Rules have a key and method name