Implementation of traits for Ruby